IE: Flexible ifelse Like Functionality for Arguments

Description Usage Arguments Value Examples

Description

Use in the place of ifelse for arguments (particularly if NULL is an option).

Usage

1
IE(input, out1, out2 = NULL, FUN = is.numeric)

Arguments

input

An object to be tested.

out1

The output if test is TRUE.

out2

The output if test is FALSE.

FUN

A function that results in a logical output.

Value

Returns output 1 (out1) or output 2 (out2) as a function of the logical test.

Examples

1
2
3
4
IE(25, 360)
IE("char", 360)
IE(NULL, 360)
IE(NULL, 360, FUN = is.null)

trinker/reports documentation built on May 31, 2019, 9:51 p.m.