50% off: Unlimited data and AI learning.
State of Data and AI Literacy Report 2025

ffbase (version 0.12.3)

condMean: Fast conditional mean

Description

condMean works like a very fast version of tapply with FUN=mean.

Usage

condMean(x, index, na.rm = FALSE, ...)

Arguments

x

numeric vector to be averaged

index

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

na.rm

logical If TRUE NA values will be removed

...

not used

Value

array with dimensions of index