2016-08-16 74 views
0

我加入R执行,并通过尝试一些简单的代码尝试()中的R不继续就例外

我读try()允许忽略任何错误,并继续在在线学习它。所以,我想这一点:

enter image description here

当我把里面log()try(),我仍然得到同样的输出;

enter image description here

我期待这样的:

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

但是10没有在输出中出现。这是为什么?

回答

2

您需要source("C:/Mahesh/workspaces/r/temp.r", echo = TRUE)