View source: R/toConditional.R
toConditional | R Documentation |
Convert Function to Function that is Called if Condition is Met
toConditional(FUN)
FUN |
a function |
square <- function(x) x^2
negate <- function(x) -x
`%>%` <- magrittr::`%>%`
do_square <- TRUE
do_negate <- TRUE
10 %>%
toConditional(square)(do_square) %>%
toConditional(negate)(do_negate)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.