Replace `NA's in Predictor Variables
Usage
na.tree.replace(frame)
Arguments
frame
|
data frame used to grow a tree.
|
Description
Adds a new level called "NA" to any discrete predictor in a data frame that
contains NAs. Stops if any continuous predictor contains an NA.Details
This function is used via the na.action argument to tree.Value
data frame such that a new level named "NA" is added to any discrete
predictor in frame with NAs.See Also
tree, na.omit.Examples
z <- tree(market.survey, na.action=na.tree.replace)