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.
________________________________
From: Irucka Embry <[email protected]>
To: [email protected]
Sent: Wednesday, March 6, 2013 9:32 PM
Subject: Re: [R] multiple plots and looping assistance requested (revised codes)
Hi Arun, I was only able to plot by changing from names(temper) to
seq_along(temper) and by providing a numeric column entry for the [i] index. My
problem has been trying to figure out how to index each column by skipping
column 1. Do you have any suggestions?
> tempernow <- lapply(seq_along(temper),function(i)
> {plot(as.matrix(temp[[i]][1]), as.matrix(temp[[i]][2]), main="Fluxmaster
> versus EGRET/WRTDS \n Seasonal Flux Sum", sub = i, xlab="Calendar Year
> Timesteps", ylab="Total Flux (kg/season)"); lines(temp[[i]][1],
> temp[[i]][2])})
Error in xy.coords(x, y) :
(list) object cannot be coerced to type 'double'
Thank you.
Irucka
irucka.pdf
Description: Adobe PDF document
______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

