View source: R/star_cleaning_functions.R
star_insert_row | R Documentation |
Insert a row in a stargazer table
star_insert_row(star, string, insert.after)
star |
the |
string |
the string of text to insert into the table |
insert.after |
insert |
the updated stargazer
output
## -- 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)
star_insert_row(star.out, "Controls? & No & No & No \\\\", insert.after = 27)
star_insert_row(star.out,
c("Controls? & No & No & No \\\\",
"Linear Model? & Yes & Yes & Yes \\\\"),
insert.after = c(27, 32))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.