bug-datamash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: datamash: "antimode" returns lowest, instead of least common, value


From: Erik Auerswald
Subject: Re: datamash: "antimode" returns lowest, instead of least common, value
Date: Thu, 7 Dec 2023 20:21:39 +0100

Hi Kingsley,

On Tue, Dec 05, 2023 at 12:39:44PM +0100, Erik Auerswald wrote:
> 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.
> > [...]
> For me, this also looks like a bug.  I think that the code is wrong and
> the man page describes the intended behavior.

I have just added tests for both the "mode" and "antimode" operations to
the datamash development version in git.  Both operations are implemented
in the same function src/utils.c::mode_value().  The "mode" code path looks
OK to me, but the "antimode" code path seems wrong.

Some of the "antimode" tests fail and are commented out, including the test
case from your bug report.

> I hope that I'll have time to look into this in about two weeks.

I have not yet found a fix for the bug, but should have more free time in
two weeks.

Kind regards,
Erik



reply via email to

[Prev in Thread] Current Thread [Next in Thread]