This repository has been archived by the owner. It is now read-only.
simple-statistics-crystal
Simple Statistics
A Crystal shard for doing simple statistical operations, such as median or standard_deviation. Inspired by the JavaScript version.
Installation
Add the dependency to your shard.yml...
dependencies:
simple_statistics:
gitlab: EvanHahn/simple-statistics.cr
...and run shards install.
Usage
require "simple_statistics"
SimpleStatistics.mean([4, 2, 0])
# => 6
SimpleStatistics.median([9, 0, 2, 1, 0])
# => 1
SimpleStatistics.standard_deviation(0..10)
# => 3.162...
For more, refer to the API docs or the source code.
Repository
simple-statistics-crystal
Owner
Statistic
- 2
- 0
- 1
- 0
- 0
- 2 days ago
- May 25, 2021
License
MIT License
Links
Synced at
Wed, 10 Dec 2025 09:22:08 GMT
Languages