Learn R Programming

SparkR (version 2.1.2)

var: var

Description

Aggregate function: alias for var_samp.

Usage

var(x, y = NULL, na.rm = FALSE, use)

variance(x)

# S4 method for Column var(x)

# S4 method for Column variance(x)

Arguments

x

a Column to compute on.

y, na.rm, use

currently not used.

See Also

var_pop, var_samp

Other agg_funcs: agg, avg, countDistinct, count, first, kurtosis, last, max, mean, min, sd, skewness, stddev_pop, stddev_samp, sumDistinct, sum, var_pop, var_samp

Examples

Run this code
# NOT RUN {
variance(df$c)
select(df, var_pop(df$age))
agg(df, var(df$age))
# }

Run the code above in your browser using DataLab