NAer | R Documentation |
Replace missing values (NA
) in a vector or dataframe.
NAer(x, replace = 0)
x |
A vector or dataframe with missing values ( |
replace |
The value to replace missing values ( |
Returns a vector or dataframe with missing values replaced.
## Not run:
set.seed(10)
(x <- sample(c(rep(NA, 4), 1:10), 20, rep=T))
NAer(x)
set.seed(10)
(y <- data.frame(matrix(x, 5, 4)) )
NAer(y)
NAer(y, "MISSING")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.