R中的异常处理 [英] Exception handling in R

查看:151
本文介绍了R中的异常处理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人在R中有异常处理的示例/教程?官方文件非常简洁。

解决方案

除了Shane的回答指向您的其他StackOverflow讨论,您可以尝试一个代码搜索功能。 Google的代码搜索指出的原始答案已经被停用,但您可以尝试





只是为了记录,还有尝试 tryCatch 可能是最好的。我尝试了Google Code Search的快速计算,但是尝试为动词本身提供太多的假阳性 - 但是似乎 tryCatch 被广泛使用。


Does anyone have examples/tutorials of exception handling in R? The official documentation is very terse.

解决方案

Besides Shane's answer pointing you to other StackOverflow discussions, you could try a code search feature. This original answer pointed to Google's Code Search has since been discontinued, but you can try

Just for the record, there is also try but tryCatch may be preferable. I tried a quick count at Google Code Search but try gets too many false positives for the verb itself -- yet it seems tryCatch is more widely used.

这篇关于R中的异常处理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆