numberof {cwhmisc}R Documentation

Count the number elements that satisfy a condition.

Description

numberof counts the number elements that satisfy a condition.

Usage

numberof(x, f)

Arguments

x Numerical array.
f Logical function emulating the condition to be satisfied.

Author(s)

Christian W. Hoffmann <c-w.hoffmann@sunrise.ch>
http://www.wsl.ch/personal_homepages/hoffmann/index_EN

Examples

  numberof(c(1:100,NA,NA,NaN),function(x) !is.na(x))

[Package cwhmisc version 2.0.1 Index]