powered by
Returns number of distinct observations in each column of a data frame or in a vector
distinct(input, na.rm = TRUE)
data.frame or vector
remove nas or not
Num of distinct obs
# NOT RUN { x <- sample(letters[1:3],10,replace=TRUE) #distinct(x) # }
Run the code above in your browser using DataLab