NAer {qdap} | R Documentation |
Replace Missing Values (NA)
Description
Replace missing values (NA
) in a vector or dataframe.
Usage
NAer(x, replace = 0)
Arguments
x |
A vector or dataframe with missing values ( |
replace |
The value to replace missing values ( |
Value
Returns a vector or dataframe with missing values replaced.
Examples
## 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)
[Package qdap version 2.4.6 Index]