Description Usage Arguments Value Examples
View source: R/magrittr_extensions.R
iff
returns output of the function if and only if test is TRUE
.
iffn
returns output of the function if and only if test is FALSE
.
They return the original value otherwise.
iffelse
returns output of the first function if test is TRUE
,
output of the second function otherwise.
1 2 3 4 5 |
obj |
object to apply test and fun to |
test |
logical or function to apply to test |
fun |
function to apply |
... |
passed on to test |
true_fun |
function to apply when test is true |
false_fun |
function to apply when test is false |
Output of function fun
applied to the original value or the
original value, depending on the test.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.