where: Apply a boolean function to each entry of x

Description Usage Arguments Value Examples

Description

[f(x_1), f(x_2), ..., f(x_n)]

Usage

1
where(f, x)

Arguments

f

a boolean function

x

a numeric vector

Value

[(f(x_1), f(x_2), ..., f(x_n))]

Examples

1
where(function(x) x>0, -2:2)

mucun1988/cm documentation built on May 5, 2019, 8:02 p.m.