Duplicated: Counting-Generalization of duplicated()
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.
Note that duplicated() is not TRUE for the first time a
duplicate appears, whereas Duplicated() only marks unique
entries with nomatch (NA).
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.
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.
nomatch
passed to match(): the value to be
returned in the case when no match is found. Note that it is
coerced to integer.
Author
Christoph Buser and Martin Maechler, Seminar fuer Statistik, ETH
Zurich, Sep.2007