multiassign(Biobase)
multiassign()所属R语言包:Biobase
Assign Values to a Names
值分配到一个名称
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Assign values to names in an environment.
值分配给一个环境中的名称。
用法----------Usage----------
multiassign(x, value, envir = parent.frame(), inherits=FALSE)
参数----------Arguments----------
参数:x
A vector or list of names, represented by strings.
一个向量或列表的名称,由字符串表示的。
参数:value
a vector or list of values to be assigned.
被分配一个向量或值列表。
参数:envir
the environment to use. See the details section.
environment使用。看到细节部分。
参数:inherits
should the enclosing frames of the environment be inspected?
环境封闭的框架应进行检查?
Details
详情----------Details----------
The pos argument can specify the environment in which to assign the object in any of several ways: as an integer (the position in the search list); as the character string name of an element in the search list; or as an environment (including using sys.frame to access the currently active function calls). The envir argument is an alternative way to specify an environment, but is primarily there for back compatibility.
的的pos参数可以指定任何在以下几个方面的分配对象所处的环境:在搜索中的一个元素的字符串名称作为一个整数(search列表中的位置);列表;或environment(包括使用sys.frame访问当前活跃的函数调用)。论据是envir另一种方式来指定一个环境,但主要是为后面的兼容性有。
If value is missing and x has names then the values in each element of x are assigned to the names of x.
如果value缺少x的名称,然后在每个元素的值x分配到x的名称。
值----------Value----------
This function is invoked for its side effect, which is assigning the values to the variables in x. If no envir is specified, then the assignment takes place in the currently active environment.
这个函数被调用其副作用,这是valuesx变量分配。如果没有envir被指定,那么分配在当前活跃的环境中进行。
If inherits is TRUE, enclosing environments of the supplied environment are searched until the variable x is encountered. The value is then assigned in the environment in which the variable is encountered. If the symbol is not encountered then assignment takes place in the user's workspace (the global environment).
如果inherits是TRUE,搜索,直到封闭的环境所提供的环境变量x遇到。然后被分配在环境中遇到的变量值。如果没有遇到符号分配在用户的工作空间(全球环境)的地方。
If inherits is FALSE, assignment takes place in the initial frame of envir.
如果inherits是FALSE,分配在初始帧的envir的地方。
举例----------Examples----------
#-- Create objects 'r1', 'r2', ... 'r6' --[ - 创建对象R1,R2,... R6 - ]
nam <- paste("r",1:6, sep=".")
multiassign(nam, 11:16)
ls(pat="^r..$")
#assign the values in y to variables with the names from y[y为变量分配值与y的名字]
y<-list(a=4,d=mean,c="aaa")
multiassign(y)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|