duplicated: Determine duplicate elements

Description Usage Arguments Value See Also Examples

Description

Determines which elements of a vector-like or data-frame-like object are duplicates of elements with smaller subscripts, and returns a logical vector indicating which elements (rows) are duplicates.

NOTE: This man page is for the duplicated and anyDuplicated S4 generic functions defined in the BiocGenerics package. See ?base::duplicated for the default methods (defined in the base package). Bioconductor packages can define specific methods for objects (typically vector-like or data-frame-like) not supported by the default method.

Usage

1
2
duplicated(x, incomparables=FALSE, ...)
anyDuplicated(x, incomparables=FALSE, ...)

Arguments

x

A vector-like or data-frame-like object.

incomparables, ...

See ?base::duplicated for a description of these arguments.

Value

The default duplicated method (see ?base::duplicated) returns a logical vector of length N where N is:

Specific duplicated methods defined in Bioconductor packages must also return a logical vector of the same length as x when x is a vector-like object, and a logical vector with one element for each row when x is a data-frame-like object.

The default anyDuplicated method (see ?base::duplicated) returns a single non-negative integer and so must the specific anyDuplicated methods defined in Bioconductor packages.

anyDuplicated should always behave consistently with duplicated.

See Also

Examples

1
2
3
4
5
6
7
duplicated
showMethods("duplicated")
selectMethod("duplicated", "ANY")  # the default method

anyDuplicated
showMethods("anyDuplicated")
selectMethod("anyDuplicated", "ANY")  # the default method

BiocGenerics documentation built on April 17, 2021, 6:01 p.m.