# \dontshow{
op <- options(cli.unicode = FALSE, pillar.sigfig = 4)
# }
load_mgcv()
df <- data_sim("eg1", seed = 42)
m <- bam(y ~ s(x0) + s(x1) + s(x2) + s(x3), data = df)
# generate data over range of x1 for smooth s(x1)
smooth_data(m, id = 2)
# generate data over range of x1 for smooth s(x1), with typical value for
# other covariates in the model
smooth_data(m, id = 2, include_all = TRUE)
# \dontshow{
options(op)
# }
Run the code above in your browser using DataLab