Bug#1057439: datamash: "antimode" returns lowest, instead of least common, value
Erik Auerswald
auerswal at unix-ag.uni-kl.de
Tue Dec 5 11:39:44 GMT 2023
Hi Kingsley,
On Mon, Dec 04, 2023 at 09:05:57PM -0800, Kingsley G. Morse Jr. wrote:
> [...]
> The main reason I'm writing is datamash's
> "antimode" statistical grouping operation did not
> work as I expected.
>
> datamash's man page says its "antimode"
> statistical grouping operation is for the "least
> common value".
>
> But, my testing suggests datamash's "antimode"
> instead returns the lowest value.
>
> My simple test is to
>
> 1.) copy
>
> echo -e "1\n1\n2" | datamash antimode 1
>
> to the bash command prompt and
>
> 2.) press the <enter> key.
>
> At least on my computer, it returns "1".
>
> But, I expected it to return "2", because "2" is
> the least common value.
>
> I suppose maybe either datamash's man page and/or code
> could be changed so they're consistent.
For me, this also looks like a bug. I think that the code is wrong and
the man page describes the intended behavior.
I hope that I'll have time to look into this in about two weeks.
Kind regards,
Erik
More information about the debian-science-maintainers
mailing list