[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## Re: Basic calculation mistakes (e.g. mean/median)

**From**: |
Brandon Invergo |

**Subject**: |
Re: Basic calculation mistakes (e.g. mean/median) |

**Date**: |
Tue, 10 Nov 2020 13:48:02 +0000 |

**User-agent**: |
mu4e 1.4.10; emacs 27.1 |

Andreas Sommer writes:
>* $ seq 1 3 | datamash -H mean 1 median 1*
>* mean(1) median(1)*
>* 2.5 2.5*
>
>* $ seq 1 3 | datamash -R 5 -H mean 1 median 1*
>* mean(1) median(1)*
>* 2.50000 2.50000*
>
>* ---*
>
>* $ seq 1 4 | datamash -H -R 2 mean 1 median 1*
>* mean(1) median(1)*
>* 3.00 3.00*
>
>* Until that gets fixed, it means I can't trust the tool :(*
All of those results are correct. The -H option is synonymous with
--header-in and --header-out, so the first row (containing the value 1)
is being treated as a header row not a data row.
--
-brandon