Learn R Programming

flextable (version 0.7.0)

as_flextable.gam: tabular summary for gam object

Description

produce a flextable describing a generalized additive model produced by function mgcv::gam.

Usage

# S3 method for gam
as_flextable(x, ...)

Arguments

x

gam model

...

unused argument

Illustrations

See Also

Other as_flextable methods: as_flextable.glm(), as_flextable.grouped_data(), as_flextable.htest(), as_flextable.lm(), as_flextable.tabulator(), as_flextable.xtable(), as_flextable()

Examples

Run this code
# NOT RUN {
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
}
# }

Run the code above in your browser using DataLab