ntypes: Number of Unique Elements

Description Usage Arguments Details Author(s) Examples

View source: R/ntypes.R

Description

Find the number of unique elements in a vector.

Usage

1

Arguments

vector

The vector of interest.

Details

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.

Author(s)

Santiago Barreda <[email protected]>

Examples

1
2
3
data (pb52)
## the number of unique vowel categories.
ntypes (pb52$vowel)

phonTools documentation built on May 29, 2017, 9 a.m.