Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/component/standard-deviation
Array standard deviation utility σ
https://github.com/component/standard-deviation
Last synced: 13 days ago
JSON representation
Array standard deviation utility σ
- Host: GitHub
- URL: https://github.com/component/standard-deviation
- Owner: component
- Created: 2013-01-12T02:23:08.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2013-01-12T02:24:01.000Z (almost 12 years ago)
- Last Synced: 2024-05-08T17:06:47.903Z (8 months ago)
- Language: JavaScript
- Homepage:
- Size: 94.7 KB
- Stars: 6
- Watchers: 6
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- Changelog: History.md
Awesome Lists containing this project
README
# standard-deviation
standard deviation utility
## Installation
$ component install component/standard-deviation
## API
### sd(array)
Return the standard deviation of `array`:
```js
sd([1,5,6,1,2,0])
```### sd(array, fn)
standard deviation of `array` with callback `fn(val, i)`:
```js
var age = sd(users, function(u){ return u.age })
```### sd(array, string)
standard deviation of `array` with the given property `string`:
```js
var age = sd(users, 'age')
```# License
MIT