Learn R Programming

⚠️There's a newer version (4.1.23) of this package.Take me there.

The rpart package

This is the source code for the rpart package, which is a recommended package in R. It gets posted to the comprehensive R archive (CRAN) as needed after undergoing a thorough testing.

Overview

The rpart code builds classification or regression models of a very general structure using a two stage procedure; the resulting models can be represented as binary trees. The package implements many of the ideas found in the CART (Classification and Regression Trees) book and programs of Breiman, Friedman, Olshen and Stone. Because CART is the trademarked name of a particular software implementation of these ideas and tree was used for the Splus routines of Clark and Pregibon, a different acronym - Recursive PARTitioning or rpart - was chosen.

Copy Link

Version

Install

install.packages('rpart')

Monthly Downloads

48,444

Version

4.1.21

License

GPL-2 | GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Last Published

October 9th, 2023

Functions in rpart (4.1.21)

plot.rpart

Plot an Rpart Object
snip.rpart

Snip Subtrees of an Rpart Object
cu.summary

Automobile Data from 'Consumer Reports' 1990
path.rpart

Follow Paths to Selected Nodes of an Rpart Object
plotcp

Plot a Complexity Parameter Table for an Rpart Fit
solder.balance

Soldering of Components on Printed-Circuit Boards
car.test.frame

Automobile Data from 'Consumer Reports' 1990
kyphosis

Data on Children who have had Corrective Spinal Surgery
car90

Automobile Data from 'Consumer Reports' 1990
labels.rpart

Create Split Labels For an Rpart Object
rpart-internal

Internal Functions
post.rpart

PostScript Presentation Plot of an Rpart Object
prune.rpart

Cost-complexity Pruning of an Rpart Object
residuals.rpart

Residuals From a Fitted Rpart Object
rpart

Recursive Partitioning and Regression Trees
meanvar.rpart

Mean-Variance Plot for an Rpart Object
predict.rpart

Predictions from a Fitted Rpart Object
stagec

Stage C Prostate Cancer
print.rpart

Print an Rpart Object
rpart.control

Control for Rpart Fits
printcp

Displays CP table for Fitted Rpart Object
rpart.exp

Initialization function for exponential fitting
text.rpart

Place Text on a Dendrogram Plot
xpred.rpart

Return Cross-Validated Predictions
rpart.object

Recursive Partitioning and Regression Trees Object
rsq.rpart

Plots the Approximate R-Square for the Different Splits
summary.rpart

Summarize a Fitted Rpart Object
na.rpart

Handles Missing Values in an Rpart Object