agg {SparkR} | R Documentation |
Count the number of rows for each group. The resulting SparkDataFrame will also contain the grouping columns.
Compute aggregates by specifying a list of columns
agg(x, ...) summarize(x, ...) ## S4 method for signature 'GroupedData' count(x) ## S4 method for signature 'SparkDataFrame' agg(x, ...) ## S4 method for signature 'SparkDataFrame' summarize(x, ...)
x |
a GroupedData |
x |
a SparkDataFrame |
a SparkDataFrame
Other SparkDataFrame functions: SparkDataFrame-class
,
[[
, arrange
,
as.data.frame
, attach
,
cache
, collect
,
colnames
, coltypes
,
columns
, count
,
dapply
, describe
,
dim
, distinct
,
dropDuplicates
, dropna
,
drop
, dtypes
,
except
, explain
,
filter
, first
,
group_by
, head
,
histogram
, insertInto
,
intersect
, isLocal
,
join
, limit
,
merge
, mutate
,
ncol
, persist
,
printSchema
,
registerTempTable
, rename
,
repartition
, sample
,
saveAsTable
, selectExpr
,
select
, showDF
,
show
, str
,
take
, unionAll
,
unpersist
, withColumn
,
write.df
, write.jdbc
,
write.json
, write.parquet
,
write.text
## Not run:
##D count(groupBy(df, "name"))
## End(Not run)