Learn R Programming

itsadug (version 2.5)

gamtabs: Convert model summary into Latex/HTML table for knitr/R Markdown reports.

Description

Convert model summary into Latex/HTML table for knitr/R Markdown reports.

Usage

gamtabs(
  model,
  caption = " ",
  label = "tab.gam",
  pnames = NA,
  snames = NA,
  ptab = NA,
  stab = NA,
  ...
)

Value

A vector with color values.

Arguments

model

A GAM(M) model build in the package mgcv using gam or bam. Alternatively, a summary of a GAMM model could be provided.

caption

A string with the caption for the table.

label

A string for the label to refer to the table in the markdown document.

pnames

A vector with labels to relabel the rows in the parametric part of the summary.

snames

A vector with labels to relabel the rows in the smooth part of the summary.

ptab

A vector with labels to relabel the column names of the parametric summary.

stab

A vector with labels to relabel the column names of the smooth summary.

...

Optional additional arguments which are passed to xtable (see 'help(xtable)').

Author

R. Harald Baayen

See Also

summary.gam, gam, bam.

Other Functions for model inspection: dispersion(), fvisgam(), inspect_random(), plot_data(), plot_parametric(), plot_smooth(), plot_topo(), pvisgam()

Examples

Run this code
data(simdat)
if (FALSE) {
# Model with random effect and interactions:
m1 <- bam(Y ~ Group+te(Time, Trial, by=Group),
    data=simdat)
summary(m1)
gamtabs(m1, caption='Summary of m1')
}
# See for more examples:
vignette('inspect', package='itsadug')

Run the code above in your browser using DataLab