Skip to contents

[Stable]

A simple helper function that replaces NA object by NULL object.

Usage

h_null_if_na(x)

Arguments

x

(any)
atomic object of length 1. For the definition of "atomic", see is.atomic().

Value

NULL if x is NA, otherwise, x.

Examples

h_null_if_na(NA)
#> NULL