Learn R Programming

dostats (version 1.3.0)

capply: Conditional Apply

Description

A wrapper for ifelse(test(x), fun(x, ...), x)

Usage

capply(test, x, fun, ...)

Arguments

test
a test that returns a logical
fun
to apply
x
data to apply fun to.
...
other arguments to fun