**10**wrote:

I have gene expression data frame:

and i have a vector which correspond to the columns:

I would like to average the mean of the same columns according to the vector. so the two first two "Lm 10" columns will average together and so on...

what is the most efficient way to do that?

Thanks

Please paste your date as text, and provide expected output.

9.2k