Add missing math commands to docs (#2447)

This commit is contained in:
Chris Gillespie 2020-08-29 20:32:38 -07:00 committed by GitHub
parent 6535ae3d6e
commit c14b209276
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,11 +5,14 @@ Currently the following functions are implemented:
* `math avg`: Finds the average of a list of numbers or tables
* [`math eval`](math-eval.md): Evaluates a list of math expressions into numbers
* `math min`: Finds the minimum within a list of numbers or tables
* `math max`: Finds the maximum within a list of numbers or tables
* `math median`: Finds the median of a list of numbers or tables
* `math min`: Finds the minimum within a list of numbers or tables
* `math mode`: Finds the most frequent element(s) within a list of numbers or tables
* `math stddev`: Finds the standard deviation of a list of numbers or tables
* `math sum`: Finds the sum of a list of numbers or tables
* `math product`: Finds the product of a list of numbers or tables
* `math variance`: Finds the variance of a list of numbers or tables
However, the mathematical functions like `min` and `max` are more permissive and also work on `Dates`.
@ -91,11 +94,29 @@ To get the average of the file sizes in a directory, simply pipe the size column
───┴──────────
```
```shell
> echo [3 3 9 12 12 15] | math mode
───┬────
0 │ 3
1 │ 12
───┴────
```
```shell
> echo [2 3 3 4] | math product
72
```
```shell
> echo [1 4 6 10 50] | math stddev
18.1372
```
```shell
> echo [1 4 6 10 50] | math variance
328.96
```
### Dates
```shell