Learn R Programming

phenofit (version 0.2.0)

ifelse2: ifelse2

Description

ternary operator just like java `test ? yes : no`

Usage

ifelse2(test, yes, no)

Arguments

test

an object which can be coerced to logical mode.

yes

return values for true elements of test.

no

return values for false elements of test.

Examples

Run this code
# NOT RUN {
x <- ifelse2(TRUE, 1:4, 1:10)

# }

Run the code above in your browser using DataLab