找回密码
 注册
查看: 332|回复: 0

R语言 sfsmisc包 Duplicated()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-30 01:36:43 | 显示全部楼层 |阅读模式
Duplicated(sfsmisc)
Duplicated()所属R语言包:sfsmisc

                                        Counting-Generalization of duplicated()
                                         重复计数泛化()

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

Duplicated() generalizes the duplicated method for vectors, by returning indices of “equivalence classes” for duplicated entries and returning nomatch (NA by default) for unique entries.
重复的()为向量,推广duplicated方法,返回指数“等价类”重复的条目,并返回nomatch(NA默认情况下)的唯一的项目。

Note that duplicated() is not TRUE for the first time a duplicate appears, whereas Duplicated() only marks unique entries with nomatch (NA).
请注意duplicated()不TRUE第一次出现重复的,而Duplicated()唯一的项目不仅标志着nomatch(NA)。


用法----------Usage----------


Duplicated(v, incomparables = FALSE, fromLast = FALSE, nomatch = NA_integer_)



参数----------Arguments----------

参数:v
a vector, often character, factor, or numeric.
一个向量,往往是性格因素,或数字。


参数:incomparables
a vector of values that cannot be compared, passed to both duplicated() and match(). FALSE is a special value, meaning that all values can be compared, and may be the only value accepted for methods other than the default.  It will be coerced internally to the same type as x.
一个向量的值不能比拟的,通过两个duplicated()和match()。 FALSE是一个特殊值,这意味着所有值进行比较,并可能是唯一接受的方法而不是默认的值。这将强制内部的相同类型的x。


参数:fromLast
logical indicating if duplication should be considered from the reverse side, i.e., the last (or rightmost) of identical elements would correspond to duplicated=FALSE.
逻辑指示是否重复的相反侧,即,应考虑从最后一个(或最右边的)的相同的元件将对应于duplicated=FALSE。


参数:nomatch
passed to match(): the value to be returned in the case when no match is found.  Note that it is coerced to integer.
传递给match():在没有找到匹配的情况下被返回的值。请注意,它被强制转换为integer。


值----------Value----------

an integer vector of the same length as v.  Can be used as a factor, e.g., in split, tapply, etc.
一个整数向量作为v具有相同的长度。可以用来作为一个factor,例如,在split,tapply,等等。


(作者)----------Author(s)----------


Christoph Buser and Martin Maechler, Seminar fuer Statistik, ETH
Zurich, Sep.2007



参见----------See Also----------

uniqueL (also in sfsmisc); duplicated, match.
uniqueL(也sfsmisc)duplicated,match。


实例----------Examples----------


x <- c(9:12, 1:4, 3:6, 0:7)
data.frame(x, dup = duplicated(x),
              dupL= duplicated(x, fromLast=TRUE),
              Dup = Duplicated(x),
              DupL= Duplicated(x, fromLast=TRUE))

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2025-5-21 06:38 , Processed in 0.022085 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表