tersmitten / cakephp-statistics
A Statistics Plugin for CakePHP
Installs: 411
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 5
Open Issues: 0
Type:cakephp-plugin
Requires
- php: >=5.4.16
- composer/installers: ~1.0
This package is not auto-updated.
Last update: 2024-10-26 16:36:17 UTC
README
Requirements
- CakePHP 2.4.2 or greater.
- PHP 5.4.16 or greater.
Installation
Clone/Copy the files in this directory into app/Plugin/Statistics
Configuration
Ensure the plugin is loaded in app/Config/bootstrap.php
by calling:
CakePlugin::load('Statistics');
Usage
Sum
Statistics::sum(array(1, 2, 3));
Minimum
Statistics::min(array(1, 2, 3));
Maximum
Statistics::max(array(1, 2, 3));
Mean
Statistics::mean(array(1, 2, 3));
Frequency
Statistics::frequency(array(1, 2, 3, 3, 3));
Mode
Statistics::mode(array(1, 2, 2, 3));
Variance (sample and population)
Statistics::variance(array(1, 2, 3));
Statistics::variance(array(1, 2, 3), false);
Standard deviation (sample and population)
Statistics::standardDeviation(array(1, 2, 3));
Statistics::standardDeviation(array(1, 2, 3), false);
Range
Statistics::range(array(4, 6, 10, 15, 18));