high.pass.mean: Returns mean of a vector where values lower than a given...

View source: R/rutils.R

high.pass.meanR Documentation

Returns mean of a vector where values lower than a given threshold are filtered

Description

Returns mean of a vector where values lower than a given threshold are filtered

Usage

high.pass.mean(v, threshold = 0, na.rm = T)

Arguments

v

numeric or integer: Given vector for which the filtered mean is computed

threshold

numeric (scalar): value specifying the filtering threshold (default is 0)

na.rm

logical: Should missing values be filtered? (default is TRUE)

Value

numeric (scalar): Filtered mean computed

Examples

high.pass.mean(c(1, NA, 3, 2, -1, -2), threshold = 1)
[1] 2.5


genpack/gener documentation built on March 14, 2023, 9:52 a.m.