countDistinct {SparkR} | R Documentation |
Count Distinct Values
Aggregate function: returns the number of distinct items in a group.
countDistinct(x, ...) n_distinct(x, ...) ## S4 method for signature 'Column' countDistinct(x, ...) ## S4 method for signature 'Column' n_distinct(x, ...)
x |
Column to compute on |
... |
other columns |
the number of distinct items in a group.
countDistinct since 1.4.0
n_distinct since 1.4.0
Other agg_funcs: agg
, avg
,
count
, first
,
kurtosis
, last
,
max
, mean
, min
,
sd
, skewness
,
stddev_pop
, stddev_samp
,
sumDistinct
, sum
,
var_pop
, var_samp
,
var
## Not run: countDistinct(df$c)
## Not run: n_distinct(df$c)