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