Learn R Programming

SparkR (version 3.1.2)

avg: avg

Description

Aggregate function: returns the average of the values in a group.

Usage

avg(x, ...)

# S4 method for Column avg(x)

Arguments

x

Column to compute on or a GroupedData object.

...

additional argument(s) when x is a GroupedData object.

See Also

Other aggregate functions: column_aggregate_functions, corr(), count(), cov(), first(), last()

Examples

Run this code
# NOT RUN {
avg(df$c)
# }

Run the code above in your browser using DataLab