Skip to content
Prev 157112 / 398506 Next

climatological standard deviation- (question re-posted)

You might find the errbar() function from the Hmisc package useful.  Here is some code to get you started.

#load Hmisc- you may need to install the package
library(Hmisc)

attach(file)
co2.mean <- aggregate(co2,by=list(mo),FUN=mean)
co2.sd <- aggregate(co2,by=list(mo),FUN=sd)
names(co2.mean) <- c('month','mean')
names(co2.sd) <- c('month','sd')
co2.stats <- merge(co2.mean,co2.sd)
with(data=co2.stats, errbar( month, mean, mean+sd, mean-sd ))


Hope this is helpful,

Dan

Daniel Nordlund
Bothell, WA USA