File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -274,4 +274,27 @@ local({
274274 })
275275 }
276276
277+ # # ── randomForest classification snapshots (PR #87) ───────────────────────────
278+ if (requireNamespace(" randomForest" , quietly = TRUE )) {
279+ local({
280+ set.seed(42L )
281+ rf_iris <- randomForest :: randomForest(Species ~ . , data = iris , ntree = 50L )
282+ gg_iris <- gg_variable(rf_iris )
283+
284+ test_that(" snapshot: gg-variable-rf-classification-default" , {
285+ vdiffr :: expect_doppelganger(
286+ " gg-variable-rf-classification-default" ,
287+ plot(gg_iris )
288+ )
289+ })
290+
291+ test_that(" snapshot: gg-variable-rf-classification-smooth" , {
292+ vdiffr :: expect_doppelganger(
293+ " gg-variable-rf-classification-smooth" ,
294+ plot(gg_iris , xvar = " Sepal.Length" , smooth = TRUE )
295+ )
296+ })
297+ })
298+ }
299+
277300} # end CI guard
You can’t perform that action at this time.
0 commit comments