duplicated2: Determine all duplicate elements

Description Usage Arguments Value Source See Also Examples

Description

The native duplicated function determines which elements of a vector or data frame are duplicates of elements already observed in the vector or the data frame provided. Therefore, only the second occurence (or third or nth) of an element is considered as a duplicate. duplicated2 is similar but will also mark the first occurence as a duplicate (see examples).

Usage

1

Arguments

x

a vector, a data frame or a matrix

Value

A logical vector indicated wich elements are duplicated in x.

Source

http://forums.cirad.fr/logiciel-R/viewtopic.php?p=2968

See Also

duplicated

Examples

1
2
3
4
df <- data.frame(x=c("a","b","c","b","d","c"),y=c(1,2,3,2,4,3))
df
duplicated(df)
duplicated2(df)

questionr documentation built on May 29, 2017, 12:15 p.m.

Search within the questionr package
Search all R packages, documentation and source code