View source: R/misc-manipulation.R
only_if | R Documentation |
Adverb for conditionally skipping steps in a piped workflow.
only_if(condition)
condition |
Logical condition to be evaluated |
None. Called for side effects.
David Robinson, https://twitter.com/drob/status/785880369073500161
d <- tibble::as_tibble(mtcars)
d %>% only_if(TRUE)(dplyr::filter)(mpg > 25)
d %>% only_if(FALSE)(dplyr::filter)(mpg > 25)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.