Skip to contents

If using Julia, units are preserved

Usage

nonnegative(x)

Arguments

x

Value

Value

x if x is greater than 0, 0 otherwise

Examples

nonnegative(NA)
#> [1] NA
nonnegative(-1)
#> [1] 0