[R] running means

RagingJim nowa0021 at flinders.edu.au
Fri Feb 19 02:26:57 CET 2010


Ok, took me a while, but I figured it out. Because my running mean had less
years than my standard rainfall graph, when I overlaid the running mean onto
the rainfall it was trying to stretch out. So I just plotted both onto the
same graph., like so:

barplot(Ann,main=title, xlab="Year",ylab="Rainfall (mm)",
ylim=c(0,ymax),col="blue",space=0)
cp<-barplot(new[,2],space=0,col=NA,border=NA,names.arg=NA,add=T)
lines(cp,c(new[,2]),lwd=2)

#"new" is the graph I made using the running mean rainfall data tabulated
with the full year set.
-- 
View this message in context: http://n4.nabble.com/prompts-and-running-means-tp1475403p1561105.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list