ifelseObj | R Documentation |
The ifelseObj function just evaluates a condition, returning one object if it's true, and another if it's false.
ifelseObj(condition, ifTrue, ifFalse)
condition |
Condition to evaluate. |
ifTrue |
Object to return if the condition is true. |
ifFalse |
Object to return if the condition is false. |
One of the two objects
dat <- ifelseObj(sample(c(TRUE, FALSE), 1), mtcars, Orange);
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.