Mahesha999 Mahesha999 - 1 year ago 102
R Question

try() in R not continuing execution on exception

I am new to R, and learning it online by trying out some simple code

I read

allows to ignore any error and continue. So I tried this:

enter image description here

When I put
, I was still getting the same output;

enter image description here

I was expecting something like:

Error in log(x) : non-numeric argument to mathematical function
[1] 10

But that
is not appearing in the output. Why is this so?

Answer Source

You need source("C:/Mahesh/workspaces/r/temp.r", echo = TRUE)

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download