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 aggregate functions:
avg()
,
column_aggregate_functions
,
corr()
,
cov()
,
first()
,
last()
## Not run:
##D count(groupBy(df, "name"))
## End(Not run)
## Not run: count(df$c)
## Not run: n(df$c)