Learn R Programming

TDMR (version 2.2)

tdmPreNAroughfix: Replace <NA> values with suitable non <NA> values

Description

This function replaces <NA> values in a list entry or data frame column with the median (for numeric columns) or the most frequent mode (for factor columns). It does the same as na.roughfix in package randomForest, but does so faster.

Usage

tdmPreNAroughfix(object, ...)

Arguments

object

list or data frame

...

additional arguments

Value

object, the list or data frame with <NA> values replaced