Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

cv

A filter function for the coefficient of variation.


Description

cv returns a function with values for a and b bound. This function takes a single argument. It computes the coefficient of variation for the input vector and returns TRUE if the coefficient of variation is between a and b. Otherwise it returns FALSE

Usage

cv(a=1, b=Inf, na.rm=TRUE)

Arguments

a

The lower bound for the cv.

b

The upper bound for the cv.

na.rm

If set to TRUE any NA's will be removed.

Details

The coefficient of variation is the standard deviation divided by the absolute value of the mean.

Value

It returns a function of one argument. The function has an environment with bindings for a and b.

Author(s)

R. Gentleman

See Also

Examples

set.seed(-3)
  cvfun <- cv(1,10)
  cvfun(rnorm(10,10))
  cvfun(rnorm(10))

genefilter

genefilter: methods for filtering genes from high-throughput experiments

v1.72.1
Artistic-2.0
Authors
R. Gentleman, V. Carey, W. Huber, F. Hahne
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.