Learn R Programming

dostats (version 1.3.3)

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

x

data to apply fun to.

fun

to apply

...

other arguments to fun