Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

byMean

Fast conditional mean


Description

byMean works like a very fast version of tapply with (weighted) FUN=mean or FUN=weighted.mean.

Usage

byMean(x, by, na.rm = FALSE, weight = NULL, ...)

Arguments

x

numeric vector to be averaged

by

(list of) factor(s) for which the mean will be calculated

na.rm

logical If TRUE NA values will be removed

weight

numeric with of same length as x

...

not used

Value

array with dimensions of by


ffbase

Basic Statistical Functions for Package 'ff'

v0.13.3
GPL-3
Authors
Edwin de Jonge, Jan Wijffels, Jan van der Laan
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.