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

R语言中文网

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

R语言检查包裹时使用的声明globalVariables()函数-中英文对照帮助文档

[复制链接]
发表于 2020-8-21 08:04:59 | 显示全部楼层 |阅读模式
        R语言检查包裹时使用的声明globalVariables()函数-中英文对照帮助文档

                                         By MicroRbt Martinez PhD

R语言函数名:globalVariables()
R语言函数功能:检查包裹时使用的声明
来自资源库:基础库(R语言自带)
globalVariables()函数所属R语言包:所在R包具体名称、包功能的中英文双语描述见正文后面'--所在R语言包信息--'部分。

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

For globalVariables, the names supplied are of functions or other objects that should be regarded as defined globally when the check tool is applied to this package. The call to globalVariables will be included in the package's source. Repeated calls in the same package accumulate the names of the global variables.
对于globalVariables,提供的名称是将check工具应用于此程序包时应视为全局定义的功能或其他对象。对globalVariables的调用将包含在软件包的源代码中。同一包中的重复调用会累积全局变量的名称。

Typical examples are the fields and methods in reference classes, which appear to be global objects to codetools. (This case is handled automatically by setRefClass() and friends, using the supplied field and method names.)
典型示例是引用类中的字段和方法,它们对于codetools似乎是全局对象。 (这种情况由setRefClass()和朋友使用提供的字段和方法名称自动处理。)

For suppressForeignCheck, the names supplied are of variables used as .NAME in foreign function calls which should not be checked by checkFF(registration = TRUE). Without this declaration, expressions other than simple character strings are assumed to evaluate to registered native symbol objects. The type of call (.Call, .External, etc.) and argument counts will be checked. With this declaration, checks on those names will usually be suppressed. (If the code uses an expression that should only be evaluated at runtime, the message can be suppressed by wrapping it in a dontCheck function call, or by saving it to a local variable, and suppressing messages about that variable. See the example below.)
对于suppressForeignCheck,提供的名称是在外部函数调用中用作.NAME的变量,checkFF(registration = TRUE)不应检查这些变量。如果没有此声明,则假定除简单字符串之外的其他表达式的值都等于已注册的本机符号对象。将检查调用的类型(.Call,.External等)和参数计数。使用此声明,通
-----未完,待续-----,↓↓↓展开剩余72%↓↓↓
购买主题 前行需要您的支持,请赞助作者 【15 金钱】 就能浏览全部100%内容啦!(本贴一次赞助、永久可读)
回复

使用道具 举报

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

本版积分规则

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

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

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

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