nunique {miscset} | R Documentation |
Amount and Index of Unique Values
Description
Return the index or amount of unique values in a vector.
Usage
nunique(x, na = TRUE, ...)
uniquei(x, na = TRUE, ...)
Arguments
x |
Numeric vector to transform. |
na |
Logical, |
... |
Arguments forwarded to unique. |
Author(s)
Sven E. Templer
Examples
#
v <- c("a","b","a", NA)
nunique(v)
nunique(v, FALSE)
uniquei(v)
uniquei(v, FALSE)
#
[Package miscset version 1.1.0 Index]