On 5/24/20 5:34 PM, None via users wrote:
Dear fellow fedora users,
If I have a data file called 15.dat with the following content:
$ cat 15.dat
1
3
1
0
2
I think you dropped the "6" from this copy.
And I want to find min, quartile 1, median, quartile 3 and maximum (Five number summary)
We can use datamash like
$ cat 15.dat | datamash min 1 q1 1 median 1 q3 1 max 1 0 1
1.5 2.75 6
Q3 is reported as 2.75 but if we split the data file in half the number is 3.
I looked at the various ways of calculating quartiles and I can't find
one that gives this result, but it is the same result as you can get
from R (which datamash claims to be equivalent to):
data <- c(0,1,1,2,3,6)
summary(data)
Min. 1st Qu. Median Mean 3rd Qu. Max.
0.000 1.000 1.500 2.167 2.750 6.000
I can't tell you any more than that.