Skip to content

Commit

Permalink
check for new data was broken (fixes #68)
Browse files Browse the repository at this point in the history
  • Loading branch information
hofnerb committed Jan 31, 2017
1 parent 7d1ebb4 commit 4859b95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/helpers.R
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ check_newdata <- function(newdata, blg, mf, to.data.frame = TRUE) {
stop(sQuote("newdata"),
" must contain all predictor variables,",
" which were used to specify the model.")
if (!class(newdata) %in% c("list", "data.frame"))
if (!any(class(newdata) %in% c("list", "data.frame")))
stop(sQuote("newdata"), " must be either a data.frame or a list")
if (any(duplicated(nm))) ## removes duplicates
nm <- unique(nm)
Expand Down

0 comments on commit 4859b95

Please sign in to comment.