Returns the unique list of input, removing NA values, first

unique_na(x, to_unlist = FALSE)

Arguments

x

input vector

to_unlist

boolean of whether to flatten the input with unlist(); default is FALSE

Examples

unique_na(c(1, 2, 3, 3, 4, NA))
#> [1] 1 2 3 4