Description Usage Arguments Details Author(s) Examples
Find the number of unique elements in a vector.
1 | ntypes (vector)
|
vector |
The vector of interest. |
A simple function that converts a vector to a factor, and finds the number of levels. This provides the number of unique elements in a vector, something I find I frequently need.
Santiago Barreda <sbarreda@ucdavis.edu>
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.