File: as_flextable.gam.Rd

package info (click to toggle)
r-cran-flextable 0.8.4-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 2,264 kB
  • sloc: sh: 15; makefile: 2
file content (34 lines) | stat: -rw-r--r-- 792 bytes parent folder | download
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
}
}