Running examples in ‘evtree-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: StatlogHeart
> ### Title: Statlog Heart
> ### Aliases: StatlogHeart
> ### Keywords: datasets
> 
> ### ** Examples
> 
> data("StatlogHeart")
> summary(StatlogHeart)
      age            sex              chest_pain_type resting_blood_pressure
 Min.   :29.00   female: 87   typical angina  : 20    Min.   : 94.0         
 1st Qu.:48.00   male  :183   atypical angina : 42    1st Qu.:120.0         
 Median :55.00                non-anginal pain: 79    Median :130.0         
 Mean   :54.43                asymptomatic    :129    Mean   :131.3         
 3rd Qu.:61.00                                        3rd Qu.:140.0         
 Max.   :77.00                                        Max.   :200.0         
 serum_colestoral fasting_blood_sugar resting_electrocardiographic_results
 Min.   :126.0    no :230             0:131                               
 1st Qu.:213.0    yes: 40             1:  2                               
 Median :245.0                        2:137                               
 Mean   :249.7                                                            
 3rd Qu.:280.0                                                            
 Max.   :564.0                                                            
 maximum_heart_rate exercise_induced_angina    oldpeak       slope_of_the_peak
 Min.   : 71.0      no :181                 Min.   :0.00   upsloping  :130    
 1st Qu.:133.0      yes: 89                 1st Qu.:0.00   flat       :122    
 Median :153.5                              Median :0.80   downsloping: 18    
 Mean   :149.7                              Mean   :1.05                      
 3rd Qu.:166.0                              3rd Qu.:1.60                      
 Max.   :202.0                              Max.   :6.20                      
 major_vessels                   thal      heart_disease
 Min.   :0.0000   normal           :152   absence :150  
 1st Qu.:0.0000   fixed defect     : 14   presence:120  
 Median :0.0000   reversible defect:104                 
 Mean   :0.6704                                         
 3rd Qu.:1.0000                                         
 Max.   :3.0000                                         
> shw <- array(1, nrow(StatlogHeart))
> shw[StatlogHeart$heart_disease == "presence"] <- 5
> set.seed(1090)
> sht <- evtree(heart_disease ~ . , data = StatlogHeart, weights = shw) 
> sht

Model formula:
heart_disease ~ age + sex + chest_pain_type + resting_blood_pressure + 
    serum_colestoral + fasting_blood_sugar + resting_electrocardiographic_results + 
    maximum_heart_rate + exercise_induced_angina + oldpeak + 
    slope_of_the_peak + major_vessels + thal

Fitted party:
[1] root
|   [2] oldpeak < 2.8
|   |   [3] major_vessels < 1
|   |   |   [4] thal in normal, fixed defect
|   |   |   |   [5] age < 59
|   |   |   |   |   [6] oldpeak < 1.8: absence (n = 80, err = 6.2%)
|   |   |   |   |   [7] oldpeak >= 1.8: presence (n = 12, err = 16.7%)
|   |   |   |   [8] age >= 59
|   |   |   |   |   [9] serum_colestoral < 234: absence (n = 12, err = 0.0%)
|   |   |   |   |   [10] serum_colestoral >= 234: presence (n = 45, err = 22.2%)
|   |   |   [11] thal in reversible defect: presence (n = 128, err = 14.1%)
|   |   [12] major_vessels >= 1: presence (n = 355, err = 8.5%)
|   [13] oldpeak >= 2.8: presence (n = 118, err = 2.5%)

Number of inner nodes:    6
Number of terminal nodes: 7
> table(predict(sht), StatlogHeart$heart_disease)
          
           absence presence
  absence       87        1
  presence      63      119
> plot(sht)
Error in unit(1, "strwidth", split) : 
  no string supplied for 'strwidth/height' unit
Calls: plot ... edge_panel -> grid.rect -> rectGrob -> is.unit -> unit
Execution halted