Replaces NA values with 0

na_to_zero(x)

Arguments

x

Examples

x <- c(NA, 1, 2, 4, 5, 0 , 1) na_to_zero(x)
#> [1] 0 1 2 4 5 0 1