tidy.rpart: tidy up the model summary of rpart

View source: R/tidy-rpart.R

tidy.rpartR Documentation

tidy up the model summary of rpart

Description

tidy returns a tibble of variable importance for the rpart pacakge

Usage

## S3 method for class 'rpart'
tidy(x, ...)

Arguments

x

An rpart model

...

extra functions or arguments

Value

A tibble containing the importance score for each variable

Examples


# retrieve a tibble of the variable importance from an rpart model

library(rpart)
fit_rpart <- rpart(Kyphosis ~ Age + Number + Start, data = kyphosis)

tidy(fit_rpart)


njtierney/broomstick documentation built on Dec. 12, 2023, 5:08 a.m.