Vectorized over string.

str_unique(string, ...)

Arguments

string

A character vector to return unique entries.

...

Other options used to control matching behavior between duplicate strings. Passed on to stringi::stri_opts_collator().

Value

A character vector.

See also

unique(), stringi::stri_unique() which this function wraps.

Examples

str_unique(c("a", "b", "c", "b", "a"))
#> [1] "a" "b" "c"
# Use ... to pass additional arguments to stri_unique() str_unique(c("motley", "mötley", "pinguino", "pingüino"))
#> [1] "motley" "mötley" "pinguino" "pingüino"
str_unique(c("motley", "mötley", "pinguino", "pingüino"), strength = 1)
#> [1] "motley" "pinguino"