as_flextable.gam {flextable} | R Documentation |
Transform a 'gam' model into a flextable
Description
produce a flextable describing a
generalized additive model produced by function mgcv::gam
.
Usage
## S3 method for class 'gam'
as_flextable(x, ...)
Arguments
x |
gam model |
... |
unused argument |
See Also
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()
Examples
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
}
[Package flextable version 0.9.6 Index]