vswitch: Vectorized switch operation

Description Usage Arguments Examples

View source: R/technical_funs.R

Description

The 'switch' operator cannot be applied to a vector. 'vswitch' removes this limitation.

Usage

1
vswitch(EXPR, ...)

Arguments

EXPR

Expression to switch on.

...

Switching rules passed to switch

Examples

1
2
x <- letters[1:5]
vswitch(x, a="first", b="second", ">3")

antoine-sachet/customFunctions documentation built on Sept. 25, 2020, 8:56 p.m.