duplicateIndices: Finds the indices of the duplicated events of a vector

View source: R/auxiliar.R

duplicateIndicesR Documentation

Finds the indices of the duplicated events of a vector

Description

Finds the indices of duplicated elements in the vector given.

Usage

duplicateIndices(vec)

Arguments

vec

Vector of identifiers presumably duplicated

Details

For each duplication it can return a list or if all the duplication events are of the same length it returns a matrix, where each column is duplicated.

Value

The format is determined by the simplify2array

Author(s)

LluĂ­s Revilla

See Also

removeDup()

Examples

duplicateIndices(c("52", "52", "53", "55")) # One repeated element
duplicateIndices(c("52", "52", "53", "55", "55")) # Repeated elements
duplicateIndices(c("52", "55", "53", "55", "52")) # Mixed repeated elements

llrs/BioCor documentation built on April 24, 2024, 5:50 p.m.