View source: R/as_flextable_gam.R
| as_flextable.gam | R Documentation |
produce a flextable describing a
generalized additive model produced by function mgcv::gam.
## S3 method for class 'gam'
as_flextable(x, ...)
x |
gam model |
... |
unused argument |
Other as_flextable methods:
as_flextable(),
as_flextable.data.frame(),
as_flextable.glm(),
as_flextable.grouped_data(),
as_flextable.htest(),
as_flextable.kmeans(),
as_flextable.lm(),
as_flextable.merMod(),
as_flextable.pam(),
as_flextable.summarizor(),
as_flextable.table(),
as_flextable.tabular(),
as_flextable.tabulator(),
as_flextable.xtable()
if (require("mgcv")) {
set.seed(2)
# Simulated data
dat <- gamSim(1, n = 400, dist = "normal", scale = 2)
# basic GAM model
b <- gam(y ~ s(x0) + s(x1) + s(x2) + s(x3), data = dat)
ft <- as_flextable(b)
ft
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.