Entering edit mode
5.4 years ago
vinayjrao
▴
250
Hi,
I have a file with five columns, from which I want the mean of the last four columns where the first rows of the first column are the same. For example, my file looks like this -
A 1 1 1 1
A 1 3 1 1
A 1 1 2 3
B 5 7 2 4
C 2 1 5 1
C 2 2 3 6
The desired output is -
A 1 1.7 1.3 1.7
B 5 7 2 4
C 2 1.5 4 3.5
Any help would be appreciated.
Thanks.
Thank you for your help. It works perfectly.