Closed
Description
Following the example at https://rviews.rstudio.com/2019/06/19/a-gentle-intro-to-tidymodels/, running a model generates uninformative errors if the engine is not installed:
iris_ranger <- rand_forest(trees = 100, mode = "classification") %>%
set_engine("ranger") %>%
fit(Species ~ ., data = iris_training)
If ranger
not installed:
# Error in parse(text = text, keep.source = FALSE) :
# <text>:5:5: unexpected 'else'
# 4: }
# 5: else
# ^
and for:
iris_rf <- rand_forest(trees = 100, mode = "classification") %>%
set_engine("randomForest") %>%
fit(Species ~ ., data = iris_training)
If randomForest
not installed:
# Error in as.data.frame.default(x) :
# cannot coerce class ‘c("rand_forest", "model_spec")’ to a data.frame
Metadata
Metadata
Assignees
Labels
No labels