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. Michael Weylandt <michael.weylandt@gmail.com>
2012-May-26 00:43 UTC
[R] evaluate whether function returns error
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.