rpart

This package provides functions for recursive partitioning and regression trees.

Functions

FunctionDescription
meanvarCreates a plot on the current graphics device of the deviance of the node divided by the number of observations at the node. Also returns the node number.
na.rpartHandles missing values in an rpart object.
path.rpartReturns a names list, where each element contains the splits on the path from the root to the selected nodes.
plotcpGives a visual representation of the cross-validation results in an rpart object.
postGenerates a PostScript presentation plot of an rpart object.
printcpDisplays the cp table for a fitted rpart object.
pruneDetermines a nested sequence of subtrees of the supplied rpart object by recursively snipping off the least important splits, based on the complexity parameter (cp).
rpartFits an rpart model.
rpart.controlVarious parameters that control aspects of the rpart fit.
rpconvertrpart objects changed (slightly) in their internal format in order to accommodate the changes for user-written split functions. This routine updates an old object to the new format.
rsq.rpartProduces two plots. The first plots the r-square (apparent and apparent − from cross-validation) versus the number of splits. The second plots the relative error (cross-validation) +/− 1 − SE from cross-validation versus the number of splits.
snip.rpartCreates a “snipped” rpart object, containing the nodes that remain after selected subtrees have been snipped off. The user can snip nodes ...

Get R in a Nutshell, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.