Reputation: 1098
I'm trying to reuse snippets of code from the r-lib
repository. I can't find where this particular pipe operator is defined:
getOption("usethis.description") %||% list()
Could anyone direct me to the source code for this pipe operator?
Upvotes: 1
Views: 63
Reputation: 1098
Answer credit to @akrun.
%||%
is defined in rlang
:
`%||%` <- function (x, y)
{
if (is_null(x))
y
else x
}
Upvotes: 1