countDistinct {SparkR}R Documentation

Count Distinct

Description

Count Distinct

Aggregate function: returns the number of distinct items in a group.

Usage

countDistinct(x, ...)

n_distinct(x, ...)

## S4 method for signature 'Column'
countDistinct(x, ...)

## S4 method for signature 'Column'
n_distinct(x, ...)

Value

the number of distinct items in a group.

See Also

Other agg_funcs: agg, approxCountDistinct, avg, first, kurtosis, last, max, mean, min, n, sd, skewness, stddev_pop, stddev_samp, sumDistinct, sum, var_pop, var_samp, var

Examples

## Not run: countDistinct(df$c)
## Not run: n_distinct(df$c)

[Package SparkR version 2.0.0 Index]