Skip to content
Prev 318932 / 398503 Next

multiple plots and looping assistance requested (revised codes)

Hi Irucka,

I tried it and was able to plot it without any errors.? Here, your code indicates you need two lines. temper[[i]][1]
?temper[[1]][1] # which is the column 1.
? Month
1???? 1
2???? 2
3???? 3


?temper[[1]][2]
#? Data1
#1?? 1.5
#2? 12.3
#3? 11.4



Suppose I use names(temper) instead of seq_along(temper)
pdf("irucka.pdf")

?lapply(names(temper),function(i) {plot(as.matrix(temper[[i]][1]),as.matrix(temper[[i]][2]),main="Fluxmaster versus EGRET/WRTDS \n Seasonal FLux Sum",sub=i,xlab="Calendar Year Timesteps",ylab="Total Flux (kg/season)"); lines(temper[[i]][1]); lines(temper[[i]][2])})
dev.off()

which may not be the one you wanted.
A.K.