I'm pretty new to R having only gone through the basics at uni so far so I'm sorry if this is a really simple question that's been answered before.
Basically this is how my data looks right now. I've subsetted the Plants, Treatments and Soils. What I need to do is figure out how to calculate the mean of the ShootFresh
and RootFresh
of each plant for the control and competition treatments for each of the soil types. My efforts so far just calculate the mean of each plant ShootFresh
and RootFresh
in the control and competition but combine the soils.... I can't seem to figure out how to use all three factors.
This is the code I'm using at the moment
tapply(F.ovina$ShootFresh,F.ovina$Treatment,FUN=mean)
Again I'm really sorry if this has been asked but I couldn't make heads or tails of any other answers!