Hi, I would like to average the data for certain rows in a tab-delimited file, for example the file looks like this:
Name10128 1A 33.2 A Test 0.71565 -0.011379692 Name4382 1A 34.3 A Test 0.9043 -0.035366577 Name1635 1A 34.9 A Test 0.836 -0.053808688 Name10267 1A 34.9 A Test 0.04575625 0.050878715 Name10039 1A 34.9 A Test 0.7606 -0.011123925 Name22270 1A 44.7 A Test 0.047 0.122532651 Name22285 1A 44.7 A Test 0 0.298871748 Name22701 1A 44.7 A Test 0.045 0.05038769 Name10054 1A 46.4 A Test 0 0.641618497
I want to scan down column3 and where there are identical entries, for example 34.9 and 44.7 I want to average the values in columns 6 and 7. So for the three rows that have 34.9 in column3, I would need to average the column6 values 0.836, 0.04575625 and 0.7606 and then replace those values in column6 with the average value, and do the same in column 7 for the values found there. What would be the most sensible way to proceed with this?
In reply to average a column in tab-delimited file by garyboyd
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |