Set a default value if an object is null

lhs %||% rhs

Arguments

lhs

An object to set if it's null

rhs

The value to provide if x is null

Value

rhs if lhs is null, else lhs

References

https://adv-r.hadley.nz/functions.html#missing-arguments

Author

Hadley Wickham