i ve a data frame in R with variables and want to compute a new variable D.
variable A has ID for an area, variable B has different species (1,2,3, etc.), variable C has different values and i want now compute a new variable where D= mean of variable C of species 1 (variable B) in area 1 (variable A) and so on, for every different species in evry plot i need such a new value.
i hope you can understand my problem