unique_tagged_na | R Documentation |
These adaptations of base::unique()
, base::duplicated()
,
base::order()
and base::sort()
treats tagged NAs as distinct
values.
unique_tagged_na(x, fromLast = FALSE)
duplicated_tagged_na(x, fromLast = FALSE)
order_tagged_na(
x,
na.last = TRUE,
decreasing = FALSE,
method = c("auto", "shell", "radix"),
na_decreasing = decreasing,
untagged_na_last = TRUE
)
sort_tagged_na(
x,
decreasing = FALSE,
na.last = TRUE,
na_decreasing = decreasing,
untagged_na_last = TRUE
)
x |
a vector |
fromLast |
logical indicating if duplication should be considered from the last |
na.last |
if |
decreasing |
should the sort order be increasing or decreasing? |
method |
the method to be used, see |
na_decreasing |
should the sort order for tagged NAs value be |
untagged_na_last |
should untagged |
x <- c(1, 2, tagged_na("a"), 1, tagged_na("z"), 2, tagged_na("a"), NA)
x %>% print_tagged_na()
unique(x) %>% print_tagged_na()
unique_tagged_na(x) %>% print_tagged_na()
duplicated(x)
duplicated_tagged_na(x)
order(x)
order_tagged_na(x)
sort(x, na.last = TRUE) %>% print_tagged_na()
sort_tagged_na(x) %>% print_tagged_na()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.