star_notes_tex: 'stargazer' tex table notes

View source: R/star_table_notes.R

star_notes_texR Documentation

stargazer tex table notes

Description

stargazer tex table notes

Usage

star_notes_tex(star, note.type = c("caption", "threeparttable"), note)

Arguments

star

stargazer output

note.type

the type of latex note to be used. Options include "caption" for use with the latex caption package and "threeparttable" for use with the latex threeparttable package. Only the first element of type will be used

note

the note to be added to the latex table

Examples

## -- Regression Example -- ##
library(stargazer)
data(mtcars)
mod.mtcars.1 <- lm(mpg ~ hp + wt, mtcars)
mod.mtcars.2 <- lm(mpg ~ hp + wt + cyl, mtcars)
mod.mtcars.3 <- lm(hp ~ wt + cyl, mtcars)
##latex example
star.out <- stargazer(mod.mtcars.1, mod.mtcars.2, mod.mtcars.3,
                      type = "latex")
print(star.out)
##use latex caption package
star_notes_tex(star.out, note = "my table notes")
##use latex caption package
star_notes_tex(star.out, note.type = "caption", note = "my table notes")
##use latex threeparttable package
star_notes_tex(star.out, note.type = "threeparttable", note = "my table notes")

ChandlerLutz/starpolishr documentation built on April 16, 2023, 8:55 a.m.