README in easystats-0.0.1 vs README in easystats-0.0.2
- old
+ new
@@ -1,9 +1,26 @@
Gem Name: Easystats
Gem Author: Matthew Grigajtis (http://www.matthewgrigajtis.com)
-Description: Provides easy to use statistical function
+Description: Provides easy to use statistical functions
+Functions Provided:
+sum(x)
+Parameters: Takes in an array of numbers
+Returns: The sum of the numbers in the array
+
+mean(x)
+Parameters: Takes in an array of numbers
+Returns: The mean (average) of the numbers in the array
+
+standard_deviation(x)
+Parameters: Takes in an array of numbers
+Returns: The standard deviation of the numbers in the array
+
+median(x)
+Paramaters: Takes in an array of numbers
+Returns: The median of the numbers in the array
+
Example usage:
require "rubygems"
require "easystats"
@@ -12,8 +29,9 @@
myNumbers = [4, 8, 15, 16, 23, 42]
# Create a new Easystats Object
m = Easystats.new
+puts "Sum: " + m.sum(myNumbers).to_s
puts "Average: " + m.mean(myNumbers).to_s
puts "Standard Deviation: " + m.standard_deviation(myNumbers).to_s
-
+puts "Median: " + m.median(myNumbers).to_s