[R] evaluate whether function returns error

R. Michael Weylandt <michael.weylandt@gmail.com> michael.weylandt at gmail.com
Sat May 26 02:43:53 CEST 2012


I'm not sure I follow... It's an error -- what do you mean by "evaluate"?

If you are looking to catch errors, you can do so with try or tryCatch and then check for inherits(x, "try-error") to see if there was an error. See the examples for details of how exactly to set this up -- I'm not at a computer right now and my memory is fuzzy. 

M

On May 25, 2012, at 4:52 PM, mdvaan <mathijsdevaan at gmail.com> wrote:

> Hi,
> 
> The following returns an error message. How do I evaluate (TRUE or FALSE)
> the function?
> 
> require(XML)
> readHTMLTable("http://www.sec.gov/Archives/edgar/data/2969/000095012399010952/0000950123-99-010952.txt")
> 
> Thanks in advance!
> 
> Math
> 
> --
> View this message in context: http://r.789695.n4.nabble.com/evaluate-whether-function-returns-error-tp4631406.html
> Sent from the R help mailing list archive at Nabble.com.
> 
> ______________________________________________
> R-help at 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.



More information about the R-help mailing list