R/nona.R
nona.Rd
Converts NAs to 0s
nona(vec = NULL)
Required. Character or Numeric vector.
Character vector.
x <- c(NA, 1, 0); nona(x)#> [1] 0 1 0x <- c(NA, "dk", 0); nona(x)#> [1] "0" "dk" "0"