A simple wrapper around ifelse with the condition set to missing(x)

if_missing(x, true = NA, false = x)

Arguments

x

A function argument

true

What to return if x is missing. Default is `NA`

false

What to return if x is not missing. Default to return itself