tidymodels / dials

Tools for creating tuning parameter values
https://dials.tidymodels.org/
Other
113 stars 27 forks source link

offset() name collision with stats::offset() #75

Closed RoelVerbelen closed 4 years ago

RoelVerbelen commented 4 years ago

Given that the use of an offset is important in modelling context, it would be better to avoid the name clash of dials::offset() and stats::offset() leading to errors like these (when attaching tidymodels before modelling):

library(dials) # or library(tidymodels)
data("Insurance", package = "MASS")
glm(Claims ~ District + Group + Age + offset(log(Holders)),
    data = Insurance, family = poisson)
Error: `range` must have an upper and lower bound. `Inf` and `unknown()` are acceptable values.
topepo commented 4 years ago

Yeah, we could call it kernel_offset().

github-actions[bot] commented 3 years ago

This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.