Thanks a lot.
How I can use try though for plots. There are times where the plot function will fail

 pdf(file=filename, width=width)
 try(plot_per_band(list(get(varlist[[k]])), i, j, l, datalabels=seq(1:length(varlist))))
dev.off()

the code above does not print anything.

B.R
Alex



________________________________
 From: R. Michael Weylandt <michael.weylandt@gmail.com>

Cc: R help <R-help@r-project.org> 
Sent: Sunday, March 11, 2012 12:56 AM
Subject: Re: [R] resume on error

? try or ? tryCatch

Michael


> Dear all,
> I would like to ask you how I can catch an error on R and then ask it to resume.
>
> For example I have a large for loop and I know for a small number inside that loop there will be errors. How I can ask in that case from R just to ignore it and return back to the loop?
>
> I would like to thank you in advance fro your help
>
> B.R
> Ale
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@r-project.org 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.
	[[alternative HTML version deleted]]

