NAtoValueDf: NA To Value for Dataframe

Description Usage Arguments Details Value

View source: R/NAtoUnknownFunctions.R

Description

maps all numeric or only specified numeric columns in a data frame to val

Usage

1
2
NAtoValueDf(mydata, numCols = NULL, factCols = NULL, numVal = NULL,
  newLevName = "unKnown")

Arguments

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

Details

if numVal or newLevName is null, then no action is taken that type of column

Value

the mydata data frame with num Nas mapped to numVal and fact Nas mapped to newLevName


mdavis29/modelToolKit documentation built on May 22, 2019, 3:22 p.m.