Use it
In TypeScript
import { Client, LocalTransport, PROCEDURE_REGISTRY } from "@procedures/client";
import "@procedures/statistics/register"; // registers its procedures
const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
const result = await client.exec(["statistics","summarize"], { values: [] });
console.log(JSON.stringify(result));From the command line
$ mark statistics summarize --values <number[]>
As data, in a program
{ "$proc": ["statistics", "summarize"], "input": { "values": [] } }JSON Schemas
{
"input": {
"type": "object",
"properties": {
"values": {
"type": "array",
"items": {
"type": "number"
}
}
},
"required": [
"values"
],
"additionalProperties": false
},
"output": {
"type": "object",
"properties": {
"n": {
"type": "number"
},
"mean": {
"type": "number"
},
"sd": {
"type": "number",
"description": "The sample standard deviation, or NaN for one value."
},
"min": {
"type": "number"
},
"q1": {
"type": "number",
"description": "The 0.25 quantile."
},
"median": {
"type": "number"
},
"q3": {
"type": "number",
"description": "The 0.75 quantile."
},
"max": {
"type": "number"
},
"iqr": {
"type": "number",
"description": "The interquartile range: q3 - q1."
}
},
"required": [
"n",
"mean",
"sd",
"min",
"q1",
"median",
"q3",
"max",
"iqr"
],
"additionalProperties": {}
}
}