ecpolley / SuperLearner

Current version of the SuperLearner R package
272 stars 72 forks source link

SL.gam produces warnings on CRAN #110

Closed benkeser closed 6 years ago

benkeser commented 6 years ago

I'm getting a warning from CRAN with the drtmle package (see here).

I think in SL.gam you either want

pred <- stats::predict(fit.gam, newdata = newX, type = "response")

or

pred <- gam:::predict.gam(fit.gam, newdata = newX, type = "response")

instead of the current version

pred <- gam::predict.gam(fit.gam, newdata = newX, type = "response")
ecpolley commented 6 years ago

in the gam package, they just updated the name of the S3 class to 'Gam', the version of SuperLearner on Github has a check in place now, and hope to send that over to CRAN tomorrow.

if(packageVersion('gam') >= 1.15) {
  pred <- gam::predict.Gam(fit.gam, newdata = newX, type = "response") # updated gam class in version 1.15
} else {
  pred <- gam::predict.gam(fit.gam, newdata = newX, type = "response")
}

see https://cran.r-project.org/web/packages/gam/ChangeLog

benkeser commented 6 years ago

Thanks. Now that you mention it, I do remember getting an email about this. Sorry to bother.

ecpolley commented 6 years ago

No problem, thanks for checking on it, I'll send you a note when the update is on CRAN to see if that fixes the issue.