uniqueL(sfsmisc)
uniqueL()所属R语言包:sfsmisc
A Reversable Version of unique()
一个可逆的独特版本()
译者:生物统计家园网 机器人LoveR
描述----------Description----------
A version of unique keeping enough information to reverse (or invert) to the original data.
同一版本的unique保持足够的信息来扭转(或反转)的原始数据。
用法----------Usage----------
uniqueL(x, isuniq = !duplicated(x), need.sort = is.unsorted(x))
参数----------Arguments----------
参数:x
numeric vector, of length n, say.
数值向量,长度n“说。
参数:isuniq
logical vector of the same length as x. For the reversion to work this should select at least all unique values of x.
相同的长度x逻辑向量。对于回归工作,这应该至少选择独特的价值x。
参数:need.sort
logical indicating if x is not yet sorted. Note that this argument exists only for speedup possibility when it is known, and that it must be set correctly.
如果x尚未排序的逻辑说明。请注意,这种说法只存在加速的可能性时,它是已知的,它必须正确设置。
值----------Value----------
list of two components,
两个组件的列表,
参数:ix
integer vector of indices
指数的整数向量
参数:xU
vector of values from x
矢量值x
such that both x[isuniq] === xU and xU[ix] === x.
这样,两个x[isuniq] === xU和xU[ix] === x。
(作者)----------Author(s)----------
Martin Maechler
参见----------See Also----------
Duplicated from the sfsmisc package in addition to the standard unique and duplicated.
除了Duplicatedsfsmisc包的标准unique和duplicated。
实例----------Examples----------
x0 <- c(1:3,2:7,8:4)
str(r0 <- uniqueL(x0))
with(r0, xU[ix]) ## == x0 ![#== X0!]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|