rpart.lists: Creates lists of variable values (factor levels) associated...

Description Usage Arguments Value Examples

Description

Creates lists of variable values (factor levels) associated with each rule in an rpart object.

Usage

1
rpart.lists(object)

Arguments

object

an rpart object

Value

a list of lists

Examples

1
2
3
library(rpart)
fit<-rpart(Reliability~.,data=car.test.frame)
rpart.lists(fit)

Example output

Loading required package: rpart
$L
$L$Country
[1] "Germany" "Korea"   "Sweden"  "USA"    
attr(,"compare")
Country 
    "=" 

$L$Type
[1] "Compact" "Large"   "Medium"  "Sporty" 
attr(,"compare")
Type 
 "=" 

$L$Price
[1] 12822.5
attr(,"compare")
Price 
  "<" 

$L$Price
[1] 12302
attr(,"compare")
Price 
 ">=" 


$R
$R$Country
[1] "Japan"     "Japan/USA" "Mexico"   
attr(,"compare")
Country 
    "=" 

$R$Type
[1] "Small" "Van"  
attr(,"compare")
Type 
 "=" 

$R$Price
[1] 12822.5
attr(,"compare")
Price 
 ">=" 

$R$Price
[1] 12302
attr(,"compare")
Price 
  "<" 

rpart.utils documentation built on May 2, 2019, 9:40 a.m.