powered by
Count Distinct Values
Aggregate function: returns the number of distinct items in a group.
countDistinct(x, ...)n_distinct(x, ...)# S4 method for Column countDistinct(x, ...)# S4 method for Column n_distinct(x, ...)
n_distinct(x, ...)
# S4 method for Column countDistinct(x, ...)
# S4 method for Column n_distinct(x, ...)
Column to compute on
other columns
the number of distinct items in a group.
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
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) # }
Run the code above in your browser using DataLab