findRepeated {wrMisc} | R Documentation |
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 |
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)
[Package wrMisc version 1.15.1 Index]