We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
library("gratia") library("mgcv") library("dplyr") dat <- data_sim("eg1", n = 1500, dist = "normal", scale = 20, seed = 3) |> mutate(fac = as.factor( sample(c("A1", "A2", "A3"), 1500, replace = TRUE) ), logi = as.logical( sample(c(TRUE, FALSE), 1500, replace = TRUE) )) b <- gam(y ~ x0 + x1 + I(x1^2) + s(x2, bs = "cr", k = 12) + fac + x3:fac + I(x1*x2) + logi, data = dat) # get a data slice where only `fac` varies # hold all other variables are representative values ds <- data_slice(b, fac = evenly(fac))
Note that in ds, logi has been coerced to a double:
ds
logi
> ds # A tibble: 3 × 6 fac x0 x1 x2 logi x3 <fct> <dbl> <dbl> <dbl> <dbl> <dbl> 1 A1 0.511 0.521 0.493 0 0.476 2 A2 0.511 0.521 0.493 0 0.476 3 A3 0.511 0.521 0.493 0 0.476
The issue is in typical_values()
typical_values()
The text was updated successfully, but these errors were encountered:
fixes for #222 to allow handling of logical variables
550e9c5
document #222 fixed and bump path version
6e151e7
ec064d4
No branches or pull requests
Note that in
ds
,logi
has been coerced to a double:The issue is in
typical_values()
The text was updated successfully, but these errors were encountered: