tidy returns a tibble of variable importance for the rpart pacakge

# S3 method for 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)
#> # A tibble: 3 x 2 #> variable importance #> <chr> <dbl> #> 1 Start 8.20 #> 2 Age 3.10 #> 3 Number 1.52