1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/as_flextable_gam.R
\name{as_flextable.gam}
\alias{as_flextable.gam}
\title{tabular summary for gam object}
\usage{
\method{as_flextable}{gam}(x, ...)
}
\arguments{
\item{x}{gam model}
\item{...}{unused argument}
}
\description{
produce a flextable describing a
generalized additive model produced by function \code{mgcv::gam}.
\if{html}{\out{
<img src="https://www.ardata.fr/img/flextable-imgs/flextable-002.png" alt="as_flextable.gam illustration" style="width:100\%;">
}}
}
\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
}
}
|