rowMeansCond: Parallel mean

Description Usage Arguments Value Examples

View source: R/rowmeanscond.R

Description

Form row and column sums and means for multiple vectors, numeric arrays (or data frames) conditional on the number of non-missing observations.

Usage

1
rowMeansCond(..., minobs = 1L)

Arguments

...

a series of numeric vectors, arrays, or data frames that have can be combined with cbind

minobs

an integer stating the minimum number of non-NA observations necessary to compute the row mean. Defaults to 1.

Value

A numeric vector containing the row sums or NA if not enough non-NA observations are present

Examples

1
2
3
rowMeansCond(1:5, c(1:4, NA), c(1:3, NA, NA))
rowMeansCond(1:5, c(1:4, NA), c(1:3, NA, NA), minobs=0)
rowMeansCond(1:5, c(1:4, NA), c(1:3, NA, NA), minobs=2)

MESS documentation built on Jan. 4, 2018, 4:07 a.m.

Related to rowMeansCond in MESS...