strictOp(SoDA)
strictOp()所属R语言包:SoDA
Apply strict conditions to R operators
实行严格的条件为R运营商
译者:生物统计家园网 机器人LoveR
描述----------Description----------
The expression is checked for stricter conditions on compatible arguments; if the conditions fail an error or warning is issued. If no error is issued, the expression's value is returned.
检查表达式的兼容参数的严格的条件,如果条件不发出错误或警告。如果不发出错误消息,该表达式的值返回。
用法----------Usage----------
withStrictOps(expr, attach = TRUE)
strictOp(expr, warnOnly = FALSE, errorCall)
参数----------Arguments----------
参数:expr
For withStrictOps, any expression to be evaluated. Subexpressions from the binary operators in the base package for arithmetic, comparison, and logic will be evaluated by stricter rules. For strictOp, the expression should only be one of these calls. Generally, withStrictOp will be more convenient to use, and strictOp is largely for internal use.
对于withStrictOps,任何要计算的表达式。子表达式的二进制算术,比较,逻辑的基本软件包运营商将评估更严格的规则。对于strictOp,表达式应该仅是这些调用。一般情况下,withStrictOp会使用更方便,和strictOp主要是供内部使用。
参数:attach
Optional argument, only examined if expr is missing. If TRUE, then the "strictOps" environment is attached, overriding the applicable operators with strict versions. If attach is FALSE, this environment is detached. See the details.
可选参数,如果expr缺少研究。如果TRUE,那么"strictOps"环境连接,并覆盖有严格的版本适用的运营商。 attach如果是FALSE,这样的环境是分离的。查看详细资料。
参数:warnOnly
If TRUE, only issue warnings on failures.
如果TRUE,唯一的问题在失败的警告。
参数:errorCall
Optional argument for internal use, supplying the expression to be used in error messages as the original call.
供内部使用的可选参数,供给作为原始呼叫在错误消息中要使用的表达。
Details
详细信息----------Details----------
The functions apply the stricter rules for compatibility given in section 7.1 of “Software for Data Analysis”.
功能适用于更严格的规则第7.1节“软件进行数据分析”中给出的兼容性。
Calling withStrictOps evaluates an arbitrary expression with an environment containing strict versions of all the relevant operators. Calling withStrictOps with no arguments attaches this environment to the search list, overriding the base versions of the operators. If the expressions pass the strict rules, evaluation is passed on to the corresponding base package version of the operator.
调用withStrictOps计算环境中的所有相关运营商的严格版的任意表达式。调用withStrictOps不带任何参数附加到搜索列表中,这样的环境重写基版本的运营商。如果表达式经过严格的规则,评估将被传递给相应的基础软件包版本的运营商。
值----------Value----------
the value of expr
值expr,
实例----------Examples----------
sum(rnorm(3) == as.raw(1:3))# succeeds but comparison is ambiguous[成功,但比较暧昧]
muststop(withStrictOps(sum(rnorm(3) == as.raw(1:3))),
silent = FALSE) # signals an error[信号错误]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|