unique {BiocGenerics}R Documentation

Extract unique elements

Description

unique returns an object of the same class as x (typically a vector-like, data-frame-like, or array-like object) but with duplicate elements/rows removed.

NOTE: This man page is for the unique S4 generic function defined in the BiocGenerics package. See ?base::unique for the default method (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

unique(x, incomparables=FALSE, ...)

Arguments

x

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

incomparables, ...

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

Value

See ?base::unique for the value returned by the default method.

Specific methods defined in Bioconductor packages will typically return an object of the same class as the input object.

unique should always behave consistently with BiocGenerics::duplicated.

See Also

Examples

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

[Package BiocGenerics version 0.24.0 Index]