asEach(externalVector)
asEach()所属R语言包:externalVector
Coerce each element of an external vector to a particular type
强迫每一个外部向量特定类型的元素
译者:生物统计家园网 机器人LoveR
描述----------Description----------
This generic coerces each element of an external vector to a particular type.
这个通用胁迫特定类型的外部向量中的每个元素。
用法----------Usage----------
asEach(x, type, arrayOnly = FALSE)
参数----------Arguments----------
参数:x
An external vector object.
外部矢量对象。
参数:type
Character-string, a basic vector mode.
字符的字符串,一个基本的矢量模式。
参数:arrayOnly
If arrayOnly is FALSE (the default) do not copy extra slots like Names, DimNames or Dim.
如果arrayOnly FALSE(默认)不复制额外的插槽,像Names,DimNames或Dim。
值----------Value----------
Another external vector object of same length but with class(defaultElement(x)) == class(type).
另一个相同长度的外部矢量对象,但用class(defaultElement(x)) == class(type)。
参见----------See Also----------
as to convert an object to a different class.
as转换到一个不同的类的对象。
举例----------Examples----------
x <- externalCharacter(4)
x[] <- c("1", "2", "3", "4")
asEach(x, "integer")
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|