externalVector(externalVector)
externalVector()所属R语言包:externalVector
Creating external vectors
创建外部向量
译者:生物统计家园网 机器人LoveR
描述----------Description----------
These functions can be used to create new external vector objects with newly allocated storage.
这些功能可以被用来创建新分配的外部存储新的矢量对象。
用法----------Usage----------
externalVector(type = "logical", length = 0, storageClass = "simpleStorage", indirect = FALSE)
externalLogical(length = 0, storageClass = "simpleStorage", indirect = FALSE)
externalInteger(length = 0, storageClass = "simpleStorage", indirect = FALSE)
externalNumeric(length = 0, storageClass = "simpleStorage", indirect = FALSE)
externalComplex(length = 0, storageClass = "simpleStorage", indirect = FALSE)
externalCharacter(length = 0, storageClass = "simpleStorage", indirect = FALSE)
参数----------Arguments----------
参数:type
A character-string, the name of the class of basic R vectors to be represented by the new external vector object.
字符的字符串,R来代表的新的外部矢量对象的基本向量类的名称。
参数:length
Length of the new external vector
新的外部向量的长度
参数:storageClass
name of the subclass of "externalStorage" to be used for storing the external vector elements.
的的“externalStorage”被用于存储外部矢量元素的子类的名称。
参数:indirect
If TRUE, return an "indirectExternalVector" object.
如果TRUE,返回一个“indirectExternalVector的”对象。
Details
详情----------Details----------
These functions are similar to the vector, logical, integer, numeric, complex and character functions in the R base package. These functions have an extra argument storageClass to specify the external storage class to use. The default is to use "simpleStorage" which uses garbage collected memory from R for storage.
这些功能是类似于vector,logical,integer,numeric,complex和character在R基包的功能。这些功能有一个额外的参数storageClass指定使用外部存储类。默认是使用“simpleStorage的”垃圾收集内存使用从R存储。
值----------Value----------
If indirect is FALSE (the default) the a new external vector object of the given length, given type with elements stored in an external storage object with class storageClass. Otherwise create the new external vector object but return it by wrapping it in an "indirectExternalVector" object.
如果indirect是FALSE(默认)外部给定长度,与元素类型存储在外部存储对象类storageClass一个新的矢量对象。否则,创建新的外部矢量对象,但在一个“indirectExternalVector的”对象包装返回。
参见----------See Also----------
vector, logical, integer, numeric, complex, character, list
vector,logical,integer,numeric,complex,character,list
举例----------Examples----------
x <- externalVector("numeric", 4)
x[] <- 1:4
x[1:3]
y <- x+2
y
x+y
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|