op-missing-default: Default value for 'missing_arg'

op-missing-defaultR Documentation

Default value for 'missing_arg'

Description

This infix function makes it easy to replace 'missing_arg's with a default value. It's inspired by the way that rlang's '

Usage

x %missing% y

Arguments

x, y

If 'x' is missing, will return 'y'; otherwise returns 'x'.

Examples

x <- rlang::missing_arg()
y <- x %missing% 2

pepfar-datim/datapackr documentation built on April 14, 2024, 10:35 p.m.