mean2: Fast mean computation

Description Usage Arguments Value Examples

Description

This function allows to perform sum(x) / length(x) in one shot, without performing any background check on the data. Beware of integer overflow!

Usage

1
mean2(x)

Arguments

x

Type: unknown. The variable to perform sum(x)/length(x) on.

Value

The mean.

Examples

1
mean2(c(1:1000000))

Laurae2/Laurae documentation built on May 8, 2019, 7:59 p.m.