设为首页收藏本站获取积分奖励

R语言中文网

 找回密码
 立即注册
查看: 845|回复: 0

R语言条件处理和恢复allowInterrupts()函数-中英文对照帮助文档

[复制链接]
发表于 2020-8-20 22:44:35 | 显示全部楼层 |阅读模式
        R语言条件处理和恢复allowInterrupts()函数-中英文对照帮助文档

                                         By MicroRbt Martinez PhD

R语言函数名:allowInterrupts()
R语言函数功能:条件处理和恢复
来自资源库:基础库(R语言自带)
allowInterrupts()函数所属R语言包:所在R包具体名称、包功能的中英文双语描述见正文后面'--所在R语言包信息--'部分。

描述-----Description-----

These functions provide a mechanism for handling unusual conditions, including errors and warnings.
这些功能提供了一种用于处理异常情况(包括错误和警告)的机制。


使用方法-----Usage-----

tryCatch(expr, ..., finally)
withCallingHandlers(expr, ...)
globalCallingHandlers(...)
signalCondition(cond)
simpleCondition(message, call = NULL)
simpleError    (message, call = NULL)
simpleWarning  (message, call = NULL)
simpleMessage  (message, call = NULL)
errorCondition(message, ..., class = NULL, call = NULL)
warningCondition(message, ..., class = NULL, call = NULL)
## S3 method for class 'condition' S3 method for class 'condition'
as.character(x, ...)
## S3 method for class 'error' S3 method for class 'error'
as.character(x, ...)
## S3 method for class 'condition' S3 method for class 'condition'
print(x, ...)
## S3 method for class 'restart' S3 method for class 'restart'
print(x, ...)
conditionCall(c)
## S3 method for class 'condition' S3 method for class 'condition'
conditionCall(c)
conditionMessage(c)
## S3 method for class 'condition' S3 method for class 'condition'
conditionMessage(c)
withRestarts(expr, ...)
computeRestarts(cond = NULL)
findRestart(name, cond = NULL)
invokeRestart(r, ...)
tryInvokeRestart(r, ...)
invokeRestartInteractively(r)
isRestart(x)
restartDescription(r)
restartFormals(r)
suspendInterrupts(expr)
allowInterrupts(expr)
.signalSimpleWarning(msg, call)
.handleSimpleError(h, msg, call)
.tryResumeInterrupt()

参数-----Arguments-----

参数c介绍: a condition object.
条件对象。

参数call介绍: call expression.
调用表达式。

参数cond介绍: a condition object.
条件对象。

参数expr介绍: expression to be evaluated.
要评估的表达式。

参数finally介绍: expression to be evaluated before returning or exiting.
返回或退出之前要计算的表达式。

参数h介绍: function.
功能。

参数message介绍: character string.
字符串。

参数msg介绍: character string.
字符串。

参数name介绍: character string naming a restart.
命名重新启动的字符串。

参数r介绍: restart object.
重新启动对象。

参数x介绍: object.
宾语。

参数class介绍: character string naming a condition class.
命名条件类的字符串。

参数...介绍: additional arguments; see details below.
其他参数;请参阅下面的详细信息。


详情-----Details-----

The condition system provides a mechanism for signaling and handling unusual conditions, including errors and warnings. Conditions are represented as objects that contain information about the condition that occurred, such as a message and the call in which the condition occurred. Currently conditions are S3-style objects, though this may eventually change.
条件系统提供了一种用于发信号和处理异常情况(包括错误和警告)的机制。条件表示为对象,这些对象包含有关发生的条件的信息,例如消息和发生该条件的呼叫。当前条件是S3样式的对象,尽管最终可能会改变。

Conditions are objects inheriting from the abstract class condition. Errors and warnings are objects inheriting from the abstract subclasses error and warning. The class simpleError is the class used by stop and all internal error signals. Similarly, simpleWarning is used by warning, and simpleMessage is used by message. The constructors by the same names take a string describing the condition as argument and an optional call. The functions conditionMessage and conditionCall are generic functions that return the message and call of a condition.
条件是从抽象类condition继承的对象。错误和警告是从抽象子类error和warning继承的对象。类simpleError是stop和所有内部错误信号使用的类。类似地,warning使用simpleWarning,message使用simpleMessage。具有相同名称的构造函数将描述条件的字符串作为参数和可选调用。函数conditionMessage和conditionCall是返回消息和条件调用的通用函数。

The function errorCondition and warningCondition can be used to construct error conditions of a particular class with additional fields specified as the ... argument. warningCondition is analogous for warnings.
函数errorCondition和warningCondition可用于构造具有指定为...参数的附加字段的特定类的错误条件。 warningCondition与警告类似。<
-----未完,待续-----,↓↓↓展开剩余72%↓↓↓
购买主题 前行需要您的支持,请赞助作者 【15 金钱】 就能浏览全部100%内容啦!(本贴一次赞助、永久可读)
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Archiver|R语言中文网    

GMT+8, 2024-5-21 02:23 , Processed in 0.035440 second(s), 21 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表