| count {SparkR} | R Documentation |
Count the number of rows for each group when we have GroupedData input.
The resulting SparkDataFrame will also contain the grouping columns.
This can be used as a column aggregate function with Column as input,
and returns the number of items in a group.
count(x) n(x) ## S4 method for signature 'GroupedData' count(x) ## S4 method for signature 'Column' count(x) ## S4 method for signature 'Column' n(x)
x |
a GroupedData or Column. |
A SparkDataFrame.
count since 1.4.0
count since 1.4.0
n since 1.4.0
Other agg_funcs: agg, avg,
countDistinct, first,
kurtosis, last,
max, mean, min,
sd, skewness,
stddev_pop, stddev_samp,
sumDistinct, sum,
var_pop, var_samp,
var
## Not run:
##D count(groupBy(df, "name"))
## End(Not run)
## Not run: count(df$c)
## Not run: n(df$c)