Learn R Programming

aurelius (version 0.8.4)

extract_params.rpart: extract_params.rpart

Description

Extracts parameters from a tree made by the rpart() function

Usage

# S3 method for rpart
extract_params(object, ...)

Arguments

object

an object of class "rpart"

...

further arguments passed to or from other methods

Value

a list that is extracted from the rpart object

Examples

Run this code
model <- rpart::rpart(Kyphosis ~ Age + as.factor(Number), data = rpart::kyphosis)
my_tree <- extract_params(model)

Run the code above in your browser using DataLab