|
R语言延迟评估delayedAssign()函数-中英文对照帮助文档
By MicroRbt Martinez PhD
R语言函数名:delayedAssign()
R语言函数功能:延迟评估
来自资源库:基础库(R语言自带)
delayedAssign()函数所属R语言包:所在R包具体名称、包功能的中英文双语描述见正文后面'--所在R语言包信息--'部分。
描述-----Description-----
delayedAssign creates a promise to evaluate the given expression if its value is requested. This provides direct access to the lazy evaluation mechanism used by R for the evaluation of (interpreted) functions.
如果要求给定表达式的值,则delayedAssign创建一个promise求值。这样可以直接访问R用于评估(解释)功能的lazy evaluation机制。
使用方法-----Usage-----
delayedAssign(x, value, eval.env = parent.frame(1),
assign.env = parent.frame(1))
参数-----Arguments-----
参数x介绍: a variable name (given as a quoted string in the function call)
变量名(在函数调用中作为引号引起来的字符串)
参数value介绍: an expression to be assigned to x
要分配给x的表达式
参数eval.env介绍: an environment in which to evaluate value
在其中评估value的环境
参数assign.env介绍: an environment in which to assign x
分配x的环境
详情-----Details-----
Both eval.env and assign.env default to the currently active environment.
eval.env和assign.env都默认为当前活动的环境。
The expression assigned to a promise by delayedAssign will not be evaluated until it is eventually forced . This happens when the variable is first accessed.
由delayedAssign分配给诺言的表达式直到最终为forced时才被评估。首% |
|