name repair problem with gains_table_prep()
romainfrancois opened this issue · comments
Romain François commented
library(blorr)
model <- glm(
honcomp ~ female + read + science, data = hsb2,
family = binomial(link = "logit")
)
gtable <- blr_gains_table(model, hsb2)
#> New names:
#> * value -> value...1
#> * value -> value...2
#> Error: Can't subset columns that don't exist.
#> x Column `value` doesn't exist.
Created on 2020-04-29 by the reprex package (v0.3.0)
This then is one failure we see when testing this package against dplyr 1.0.0. This apparently comes from these lines in gains_table_prep()
:
response %>%
as_tibble() %>%
bind_cols(predict.glm(model, newdata = data, type = "response") %>%
as_tibble())
because both have value
column, so name repair kicks in.