statistics.ranks
The ranks of the values, from 1. Equal values get the mean of their ranks.
CLI- Package
- @procedures/statistics · README
- Path
["statistics","ranks"]- CLI
mark statistics ranks --values <number[]>- As data
{"$proc":["statistics","ranks"],"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","ranks"], { values: [] });
console.log(JSON.stringify(result));From the command line
$ mark statistics ranks --values <number[]>
As data, in a program
{ "$proc": ["statistics", "ranks"], "input": { "values": [] } }Input
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
values | number[] | 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": "array",
"items": {
"type": "number"
}
}
}