pmean: Piecewise mean

View source: R/all.R

pmeanR Documentation

Piecewise mean

Description

pmean is to mean what pmax is to max.

Usage

pmean(..., na.rm = TRUE)

Arguments

...

vectors

na.rm

a logical indicating whether missing values should be removed

Value

Return the average of the numbers in the same position across all inputs.

Examples

pmean(1:10, 5, 11:20)
pmean(1:10, 5, c(11:19, NA))
pmean(1:10, 5, c(11:19, NA), na.rm = FALSE)


adamleerich/alrtools documentation built on March 12, 2024, 11:38 p.m.