Skip to content
Prev 336112 / 398513 Next

aggregate()?

Not exactly the order you specified but otherwise I think this works.

library(plyr)
d <- data.frame(Stock, Soil, Nitrogen, Respiration)
ddply(d, .(Soil, Stock), summarize, mean(Nitrogen), mean(Respiration))

John Kane
Kingston ON Canada
____________________________________________________________
GET FREE SMILEYS FOR YOUR IM & EMAIL - Learn more at http://www.inbox.com/smileys
Works with AIM?, MSN? Messenger, Yahoo!? Messenger, ICQ?, Google Talk? and most webmails