str_unique | R Documentation |
str_unique()
removes duplicated values, with optional control over
how duplication is measured.
str_unique(string, locale = "en", ignore_case = FALSE, ...)
string |
Input vector. Either a character vector, or something coercible to one. |
locale |
Locale to use for comparisons. See
|
ignore_case |
Ignore case when comparing strings? |
... |
Other options used to control collation. Passed on to
|
A character vector, usually shorter than string
.
unique()
, stringi::stri_unique()
which this function wraps.
str_unique(c("a", "b", "c", "b", "a"))
str_unique(c("a", "b", "c", "B", "A"))
str_unique(c("a", "b", "c", "B", "A"), ignore_case = TRUE)
# Use ... to pass additional arguments to stri_unique()
str_unique(c("motley", "mötley", "pinguino", "pingüino"))
str_unique(c("motley", "mötley", "pinguino", "pingüino"), strength = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.