NAtoZero | R Documentation |
Extract all the missing values in a vector and turn them into a given value.
NAtoZero(v, value = 0)
v |
Vector. |
value |
Value to be given to the missing valus. |
Updated vector.
Kaspar Rufibach (maintainer), kaspar.rufibach@gmail.com,
http://www.kasparrufibach.ch
set.seed(1977)
vec <- sample(c(round(runif(10, 1, 3)), rep(NA, 10)))
NAtoZero(vec)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.