tidy.rpart.Rd
tidy returns a tibble of variable importance for the rpart pacakge
# S3 method for rpart tidy(x, ...)
x | An |
---|---|
... | extra functions or arguments |
A tibble containing the importance score for each variable
# 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