lengthunique | R Documentation |
Returns the number of unique elements in a vector
lengthunique(x)
x |
A vector of any type |
Integer representing the count of unique elements
lengthunique(c(1,1,2,3,3,4)) # Returns 4
lengthunique(c("a","a","b","c")) # Returns 3
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.