op-missing-default | R Documentation |
This infix function makes it easy to replace 'missing_arg's with a default value. It's inspired by the way that rlang's '
x %missing% y
x , y |
If 'x' is missing, will return 'y'; otherwise returns 'x'. |
x <- rlang::missing_arg()
y <- x %missing% 2
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.