Test which values are/are not unique in a vector
is_unique(x) is_not_inique(x)
x | A vector |
---|
Vector of logical values indicating TRUE
for values which are unique.
is_unique(1:10)#> [1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE#> [1] FALSE FALSE FALSE#> [1] FALSE TRUE FALSE TRUE FALSE FALSE FALSE#> x is_unique #> 1 1 FALSE #> 2 2 TRUE #> 3 3 FALSE #> 4 4 TRUE #> 5 3 FALSE #> 6 3 FALSE #> 7 1 FALSE