meann: an average mean which requires a minimum of data points nmin...

Description Usage Arguments Author(s) Examples

View source: R/utils.aggregate.R

Description

an average mean which requires a minimum of data points nmin needed if missing data is missing :)

Usage

1
meann(x, nmin, ...)

Arguments

x

vector of numeric values

nmin

minimum of data points accepted to calculate the mean (integer)

...

further arguments to mean() remember especially to set na.rm=TRUE

Author(s)

Maik Renner mrenner [at] bgc-jena.mpg.de

Examples

1
2
3
4
5
6
7
8
9
x = 1:10
meann(x,nmin = 11)
meann(NULL,nmin = 11)
x = c(1,2,NA,Inf,NaN)
meann(x,2,na.rm=TRUE)
x = c(1,2,NA,NA,NaN)
meann(x,2,na.rm=TRUE)
meann(x,3,na.rm=TRUE)
sum(!is.na(x))

laubblatt/phaselag documentation built on Sept. 30, 2020, 11:21 a.m.