This operator returns the left side if it's not NULL, otherwise it returns the right side.

a %s% b

Arguments

a

The left side value to check

b

The right side value to use if a is NULL

Examples

NULL %s% 10
#> [1] 10
5 %s% 10
#> [1] 5