Learn R Programming

aurelius (version 0.8.4)

build_model.rpart: build_model.rpart

Description

Builds an entire PFA list of lists based on a single tree

Usage

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

Arguments

object

a object of class "rpart"

...

further arguments passed to or from other methods

Value

a list of lists representation of the tree that can be inserted into a cell or pool

Examples

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

Run the code above in your browser using DataLab