n_distinct: Return the number of unique values

Description Usage Arguments Value See Also Examples

View source: R/util.R

Description

Return the number of unique values

Usage

1

Arguments

x

Vector

Value

Number of unique values of x

See Also

Other utility functions: between, cumall, cumany, cummean, distribute, first, lag, last, lead, n_groups, nth, n

Examples

1
n_distinct (c(1, 2, 3, 3, 3, 4, 5))

Example output

Loading required package: magrittr

Attaching package: 'multiplyr'

The following objects are masked from 'package:stats':

    filter, lag

[1] 5

multiplyr documentation built on May 30, 2017, 12:09 a.m.