jmckible / standard_deviation

Standard Deviation plugin for ActiveRecord (mysql only)

This URL has Read+Write access

name age message
file .gitignore Loading commit data...
file MIT-LICENSE
file README.rdoc
file Rakefile
file init.rb
directory lib/
directory test/
README.rdoc

standard_deviation

Adds standard deviation methods to ActiveRecord. sqlite does not include standard deviation methods by default, so this is designed for mysql only.

Installation

  ./script/plugin install git://github.com/jmckible/standard_deviation.git

Usage

This plugin adds two new aggregations methods to ActiveRecord: std and variance. Say you’ve got a measurements table with an integer column called ‘integer.’

  Measurement.std(:integer)
  # => 0.8165
  Measurement.variance(:integer)
  # => 0.6667

Author