How can I print statistics (mean, median, mode, std dev, MAD, LMS scale) for a certain column of a table?
I could hack it with grdinfo and some extra steps, but it’s not a grd.
I seem to recall doing this with one simple call of pshistogram in GMT 4 or 5, but I haven’t been able to figure it out in GMT 6. Either my memory is incomplete or the syntax has changed.
Hm. Can you please post the code you were using with GMT 4 or 5? I feel this can be helpful for other to check how this can be done in GMT 6. As we are already at GMT 6.5 it is not unlikely that things have changed.
Unfortunately, I don’t remember the exact syntax, but the closest I’ve gotten with GMT 6 pshistogram is:
cat mytable.txt | pshistogram -I -i3 -T0.01
0.400706297514 0.978123016204 0 3
which I believe are the min, max of column 3, and then two other numbers I don’t know.
OK, but how do I get gmtmath to compute multiple statistics (e.g., MAD, STD, etc.) simultaneously on one column? I don’t want to issue the command (and read the input table) multiple times.