Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

easystats

Package Overview
Dependencies
Maintainers
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

easystats

  • 0.5.0
  • Rubygems
  • Socket score

Version published
Maintainers
2
Created
Source

Easystats Build Status Code Climate

Created by Matthew Grigajtis

Provides easy to use statistical functions to use on an array

Install

In your shell:

gem install easystats

or in your Gemfile:

gem 'easystats'

Example

require 'easystats'

array = [4, 8, 15, 16, 23, 42, 42]

%w[
  average
  median
  mode
  range
  standard_deviation
  sum
  variance
  weighted_moving_average
].each do |method|
  puts "#{method}: #{array.send(method.to_sym)}"
end

This will result in:

average: 21.428571428571427
median: 16
mode: 42
range: 38
standard_deviation: 15.295501984321435
sum: 150
variance: 200.53061224489798
weighted_moving_average: 30.476190476190474

FAQs

Package last updated on 15 Apr 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc