powered by
This is a wrapper to length(unique(x)) or lengths(unique(x)) if x is a List object
length(unique(x))
lengths(unique(x))
x
n_distinct(var)
a vector of values
an integer vector
# NOT RUN { x <- CharacterList(c("a", "b", "c", "a"), "d") n_distinct(x) n_distinct(unlist(x)) # }
Run the code above in your browser using DataLab