Find unique combinations based on two columns and calculate the mean
问题 I have a problem in R, which I can't seem to solve. I have the following dataframe: Image 1 I would like to: Find the unique combinations of the columns 'Species' and 'Effects' Report the concentration belonging to this unique combination If this unique combination is present more than one time, calculate the mean concentration And would like to get the following dataframe: Image 2 I have tried next script to get the unique combinations: UniqueCombinations <- Data[!duplicated(Data[,1:2]),]