oscirs_stats

Crates.iooscirs_stats
lib.rsoscirs_stats
version0.3.0
sourcesrc
created_at2023-06-05 20:23:59.478762
updated_at2023-08-10 22:19:55.275503
descriptionStatistical analysis crate for scientific computing
homepagehttps://github.com/i-saac/oscirs
repositoryhttps://github.com/i-saac/oscirs
max_upload_size
id883312
size6,779
Isaac (i-saac)

documentation

https://docs.rs/oscirs_stats/latest/oscirs_stats/

README

oscirs_stats

crates.io

A statistical analysis crate for Rust

Description

This crate allows for some basic statistical analysis such as finding the mean, standard deviation or five number summary of a data vector.

Use

To get some quick data summaries, start by importing the following quick-start module and declaring a data vector.

use oscirs_stats::summaries_core::*;

let input_vec: Vec<f32> = vec![6.0, 7.0, 15.0, 36.0, 39.0, 40.0, 41.0, 42.0, 43.0, 47.0, 49.0];

To get the mean and standard deviation of the data, call the normal() method.

println!("{:?}", input_vec.normal());

To get the sample mean, sample standard deviation, and sample size, call the sample() method.

println!("{:?}", input_vec.sample());

To get the five-number summary of the data, call the five_number() method.

println!("{:?}", input_vec.five_number());

Each of these methods returns a struct that wraps all the data into a clean type, with public fields that can be read at any time.

Commit count: 24

cargo fmt