I have a dataframe which is made of 5 attributes (e.g. Plot, weight, date etc) plus 2000 spectral values (different wavelengths). Thus, there around 2005 columns.
For these columns, there are 120 measurements (24 objects * measured 5 times). I am keen to average the reflectance (wavelenghts) values (2000 columns) based on a attribute (i.e. plot).
I am thinking about using dplyr package and a pipeline:
DF &>%
group_by(Plot) %>%
aggregate(... *I am stuck here*
End goal is to have a dataframe with 2005 columns, 24 rows (each row consisting of the original metadata + the average value for each wavelength*based on the plot number).
Thanks