powered by
NAtoZer(x)
NAtoZer(c(2, 4, NA, 5)) # [1] 2 4 0 5
Run the code above in your browser using DataLab