Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

findRepeated

Find repeated elements


Description

findRepeated gets index of repeated items/values in vector 'x' (will be treated as character). Return (named) list of indexes for each of the repeated values, or NULL if all values are unique. This approach is similar but more basic compared to get1stOfRepeatedByCol.

Usage

findRepeated(x, nonRepeated = FALSE, silent = FALSE, callFrom = NULL)

Arguments

x

character vector

nonRepeated

(logical) if =TRUE, return list with elements $rep and $nonrep

silent

(logical) suppress messages

callFrom

(character) allow easier tracking of message(s) produced

Value

(named) list of indexes for each of the repeated values, or NULL if all values unique

See Also

similar approach but more basic than get1stOfRepeatedByCol

Examples

aa <- c(11:16,14:12,14); findRepeated(aa)

wrMisc

Analyze Experimental High-Throughput (Omics) Data

v1.5.4
GPL-3
Authors
Wolfgang Raffelsberger [aut, cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.