← All procedures

statistics.mean

No description.

CLI
Package
@procedures/statistics · README
Path
["statistics","mean"]
CLI
mark statistics mean --values <number[]>
As data
{"$proc":["statistics","mean"],"input":{}}

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","mean"], { values: [] });
console.log(JSON.stringify(result));

From the command line

$ mark statistics mean --values <number[]>

As data, in a program

{ "$proc": ["statistics", "mean"], "input": { "values": [] } }

Input

FieldTypeRequiredDefaultDescription
valuesnumber[]yes

Output

The schema does not list fields (number).

JSON Schemas
{
  "input": {
    "type": "object",
    "properties": {
      "values": {
        "type": "array",
        "items": {
          "type": "number"
        }
      }
    },
    "required": [
      "values"
    ],
    "additionalProperties": false
  },
  "output": {
    "type": "number"
  }
}