I am trying to run some R code from github, however these functions use a command %||%
, that doesn't seem to be in base R. What exactly does this function do and what packages, if any, do I need to get it to work on my machine? As you can imagine, this particular string is un-Google-able since it's entirely special characters.
From https://github.com/hadley/devtools/blob/master/R/utils.r
"%||%" <- function(a, b) if (!is.null(a)) a else b
It's an internal function, so you probably need to redefine it for yourself if you want to use it outside the package.
"%||%" <- devtools:::`%||%`
1 %||% NULL
## [1] 1
NULL %||% 2
## [1] 2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With