Skip to content
Prev 305032 / 398506 Next

Producing a table with mean values

Hello,

Try the following.

agg1 <- aggregate(cbind(Pico, Nano, Micro) ~ Seamount, data = SChla, mean)
agg2 <- aggregate(cbind(Pico, Nano, Micro) ~ Seamount, data = SChla, sd)

names(agg1)[-1] <- paste("u", names(agg1)[-1], sep = ".")
names(agg2)[-1] <- paste("sd", names(agg2)[-1], sep = ".")

merge(agg1, agg2)

Hope this helps,

Rui Barradas

Em 07-09-2012 21:49, Tinus Sonnekus escreveu: