I have a huge table (10 columns and 6000 rows) and I have to make an average of all the rows only if they have the same pattern in column 3 (ko). My table contains numbers and strings.
Here's an example:
pvalue padj ko pathway
17,14 0,01 ko00620 Pyruvatemetabolism
15,76 0,01 ko00620 Pyruvatemetabolism
13,22 0,00 ko00620 Pyruvatemetabolism
12,40 0,00 ko00051 Fructoseandmannosemetabolism
12,03 0,01 ko00051 Fructoseandmannosemetabolism
I would like to obtain something like this
pvalue padj ko pathway
15,38 0,01 ko00620 Pyruvatemetabolism
12,22 0,00 ko00051 Fructoseandmannosemetabolism
padjcolumn to be treated as two fields and averaged? Please edit your question and clarify your requirements.