catif | R Documentation |
Prints text using cat
only when a specified logical condition is TRUE
.
catif(cond, ...)
condition_cat(cond, ...)
cond |
Logical value. If |
... |
Additional arguments passed to |
Invisibly returns the value of cond
.
catif(TRUE, "PDF") # This text is printed
catif(FALSE, "Moodle") # Nothing is printed
condition_cat(TRUE, "Hello") # Alias works the same way
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.