Skip to contents

INTERNAL FUNCTION: Replace missing values by zero

Usage

NaToZero(x, warn = NULL)

Arguments

x

Input data

warn

Warning text when non-null

Value

Input data where missing is replaced by zero

Examples

NaToZero(c(1,2,NA,4))
#> [1] 1 2 0 4