[R] Try for to use in read.pnm()
ligges at statistik.uni-dortmund.de
Sun Feb 2 11:59:03 CET 2003
Francisco do Nascimento Junior wrote:
> I don't obtain to use try to capture an error of read.pnm().
> I was using:
> res <- try(read.pnm(file_name))
> But I don't understand that the variable res represents,
?try tells us:
"The value of the expression if expr is evaluated without error, but an
invisible object of class "try-error" containing the error message if it
[R-Core: One "if" too much at the end of that sentence]
> or eiher, as I can access its attrbites.
See ?attributes and ?attr
There is only one attribute, class = "try-error", if expr fails...
> Francisco Júnior,
> Computer Science - UFPE-Brazil
> "One life has more value that the
> world whole"
More information about the R-help