marjoleinF / pre

an R package for deriving Prediction Rule Ensembles
58 stars 17 forks source link

Error in unames[factors] : invalid subscript type 'list' #18

Closed alosha79 closed 5 years ago

alosha79 commented 5 years ago
data("airquality")
dat2 = airquality[complete.cases(airquality), ]
str(dat2)
airq.ens <- pre(Ozone ~ ., data = dat2, verbose = TRUE)

Then I run airq.ens <- pre(Ozone ~ ., data = dat2, verbose = TRUE) and get the error: A rule ensemble for prediction of a continuous response will be created. Error in unames[factors] : invalid subscript type 'list'

marjoleinF commented 5 years ago

I cannot replicate, on my system it runs without error. Before fitting a prediction rule ensemble with pre(), make sure to use set.seed() first, to allow for later replication of the results.

marjoleinF commented 5 years ago

This error most likely occurs with older version of package partykit. Updating to the latste version (>1.2-0) likely solves the error.