-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
Plotting from estimate_means()
with a poisson model fails
#231
Comments
Can you create a reprex that includes the error message, or post the traceback? |
Thanks for looking into this...
|
hm, I get a completely different error here: library(modelbased)
set.seed(123)
dat <- data.frame(y = rpois(100, 3), FC = gl(4, 20, 100))
dat_glm <- glm(y ~ FC, data = dat, family = poisson(link = "log"))
dat_glm |> estimate_means() |> plot()
#> We selected `at = c("FC")`.
#> Error in `rlang::sym()`:
#> ! Can't convert a character vector to a symbol.
#> Backtrace:
#> ▆
#> 1. ├─base::plot(estimate_means(dat_glm))
#> 2. └─modelbased:::plot.estimate_means(estimate_means(dat_glm))
#> 3. ├─graphics::plot(layers)
#> 4. ├─datawizard:::plot.visualisation_recipe(layers)
#> 5. ├─base::NextMethod()
#> 6. └─see:::plot.see_visualisation_recipe(layers)
#> 7. └─see::geoms_from_list(x, ...)
#> 8. └─see::geom_from_list(x[[i]])
#> 9. ├─base::do.call(ggplot2::aes, lapply(x$aes, .str_to_sym))
#> 10. └─base::lapply(x$aes, .str_to_sym)
#> 11. └─see (local) FUN(X[[i]], ...)
#> 12. └─rlang::sym(x)
#> 13. └─rlang:::abort_coercion(x, "a symbol")
#> 14. └─rlang::abort(msg, call = call) Created on 2023-10-12 with reprex v2.0.2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I suspect the reason is that
.clean_names_frequentist()
should also includenames(means)[names(means) == "rate"] <- "Mean"
.The text was updated successfully, but these errors were encountered: