bug-datamash
[Top][All Lists]
Advanced

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

mode and antimode


From: tomasn
Subject: mode and antimode
Date: Mon, 27 Jan 2020 10:10:54 -0000
User-agent: Posteo Webmail

Hello Datamash

I have this datamash at work, (using alias dm=datamash)

$ dm --version
datamash (GNU datamash) 1.3
Copyright (C) 2018 Assaf Gordon
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Assaf Gordon.

and exploring the mode and anitmode operations:

$ dm unique 5 < data.txt
12.0,24.0,8.0,999.0
$ cat data.txt | grep '24.0' | wc -l
5917
$ cat data.txt | grep '8.0' | wc -l
935
$ cat data.txt | grep '999.0' | wc -l
1
$ dm mode 5 < data.txt
24
$ dm antimode 5 < data.txt
8

I would have expected anitmode to output 999 here but that might be because of my poor understanding of the operation. Am I missunderstanding the meaning of "least common value"? I can happily share the data file if necessary.

Best regards
--
Tomas



reply via email to

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