nUN: Count the number of unique values in a vector

Description Usage Arguments Examples

View source: R/utils_pkgtools.r

Description

Shortcut for compose(length, unique). Count the number of distinct values in an atomic vector.

Usage

1
nUN(x)

Arguments

x

a vector whose unique elements are to be counted.

Examples

1
nUN(rep(1:5, 5:1)) # 5

SESman/rbl documentation built on June 24, 2017, 8:48 a.m.