Help with "by"
AllenL wrote:
Searched for "by" in forums and no hits, should be simple problem. This is my line:
bio.mean<-by(Data,Plot, function(x) mean(AbvBioAnnProd))
I want to calculate the mean of "AbvBioAnnProd" in each Plot. What am I doing wrong?
What is AbvBioAnnProd? I only see that you pass Data, Plot and the parts of Data subscripted by Plot as x into the anonymous function, but there is no AbvBioAnnProd that mean can use so far ... You need to tell us why R should know anything about that object. Uwe Ligges
Thanks in advance, -AL