tests/testthat/_snaps/predict.cubist.md

predict.cubist errors when newdata is NULL

Code
  predict(mod, newdata = NULL)
Condition
  Error:
  ! newdata must be non-null

predict.cubist errors with multiple neighbors values

Code
  predict(mod, data$x, neighbors = c(1, 2))
Condition
  Error in `predict.cubist()`:
  ! only a single value of neighbors is allowed

predict.cubist errors when neighbors > 9

Code
  predict(mod, data$x, neighbors = 10)
Condition
  Error in `predict.cubist()`:
  ! 'neighbors' must be less than 10


Try the Cubist package in your browser

Any scripts or data that you put into this service are public.

Cubist documentation built on March 3, 2026, 1:06 a.m.