[R] try-error within for loop

Olga Lyashevska olga at herenstraat.nl
Fri Aug 6 16:05:39 CEST 2010


Wu Gong wrote:
> So, try() inside loop should work. Like 
> 
> for (....) { 
> if (class(try(...,silent=T))=="try-error") result[[i]] <- NA 
> ... 
> } 

Thanks a lot, it worked for me!

Cheers
Olga



More information about the R-help mailing list