Description Usage Arguments Details Value
View source: R/NAtoUnknownFunctions.R
maps all numeric or only specified numeric columns in a data frame to val
1 2 | NAtoValueDf(mydata, numCols = NULL, factCols = NULL, numVal = NULL,
newLevName = "unKnown")
|
mydata |
a dataframe |
numCols |
a char vector of numeric column names to apply the na to zero |
factCols |
a char vector of factor column names |
numVal |
a numeric value to replace NA in numeric columns |
newLevName |
new level Name for NA levels |
if numVal or newLevName is null, then no action is taken that type of column
the mydata data frame with num Nas mapped to numVal and fact Nas mapped to newLevName
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.