Blyx Nest Blyx language
Registry / Library
library · v0.1.1

StrataMean

Pool event counts and expose the crude observed rate.

Source repository · Package JSON

Use StrataMean

use vendor::stratamean::stratamean;

Run the example

nest demo stratamean@0.1.1
blyxc native-run stratamean-demo/main.blyx
Example source and expected output
use vendor::stratamean::stratamean;

fn main() {
    let events = [2, 6];
    let trials = [4, 8];
    let result = stratamean_pooled(events, trials);
    if len(result) == 0 { println!("invalid"); return; }
    let mut i = 0;
    while i < len(result) {
        println!(at(result, i));
        i += 1;
    }
}

Expected output

8
12
0.6666666666666666

Published versions

VersionPackageSource commitSHA-256
0.1.1Download ZIPf234c6e5476f6faeb15b255a533e2d3da654b98f7ca5fb63a04e3adf2cb32ae886af076f53