Skip to contents

Extract duplicated values

Usage

dupes(x)

notDupes(x)

Arguments

x

vector.

Value

Modified object. Only duplicated values are returned, made unique. Returns empty vector of length 0 when no duplicates are detected.

Note

Updated 2023-09-26.

Examples

## character ====
vec <- c("ccc", "aaa", "bbb", "ccc", "bbb")
x <- dupes(vec)
print(x)
#> [1] "ccc" "bbb"
x <- notDupes(vec)
print(x)
#> [1] "aaa"