New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error with predict when newdata is tibble #68

carlganz opened this Issue Jan 30, 2017 · 0 comments


None yet
1 participant

carlganz commented Jan 30, 2017


When newdata in predict is a tibble there is an error:


# example from docs
data("bodyfat", package = "")

mod <- mboost(DEXfat ~ btree(age) + bols(waistcirc) + bbs(hipcirc),
              data = bodyfat)

predict(mod, as_tibble(bodyfat))
# errors

This line generates the error:

if (!class(newdata) %in% c("list", "data.frame"))

Changing the if statement to if (!any(class(newdata) %in% c("list", "data.frame"))) works in this instance, but I haven't thought about it enough to know if it works in general.

@hofnerb hofnerb closed this in 4859b95 Jan 31, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment