[R] "try-error" can not be test. Why?

Ben Bolker bbolker at gmail.com
Wed Sep 8 20:12:05 CEST 2010


telm8 <chienlinterry.huang <at> postgrad.manchester.ac.uk> writes:

> 
> 
> Thank worked! Thank you so much!!!


  in general it is safer (I think) to test

inherits(try(log("a")),"try-error")

  which takes care of the case when class(try(log("a"))) has
length > 1



More information about the R-help mailing list