Description Usage Arguments Value Author(s) Examples
View source: R/encodeMissing.R
Changes the way in which missing values are represented within features. Various systems uses different reserved values for missing data, this function uses the most common reserved values and replaces them with NA
1 2 | encodeMissing(x, numEncode = NULL, charEncode = c("", " ", "UNKNOWN",
"MISS", "MISSING", "UNK", "NA", "NULL", "N/A"), autoCode = TRUE)
|
x |
[data.frame | Required] Data.frame containing numeric features to transform |
numEncode |
[numeric vector | Optional] Numeric vector containing reserved values for missing data. Default of NULL |
charEncode |
[character vector | Optional] Character vector containing reserved values for missing data. Default of c(”,' ','UNKNOWN','MISS','MISSING','UNK','NA','NULL','N/A') |
autoCode |
[logical | Optional] Should code be generated when running the function |
List containing data.frame with encoded features as well as code when autoCode is TRUE
Xander Horn
1 | res <- encodeMissing(x = iris[,1:4])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.