knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "README-" )
This package allows for easy post polishing of latex stargazer
output. See
this vignette for
a quick introduction. For examples, see the Tables
section of my
papers here and here. All of these tables were generated
exclusively within R using stargazer
and starpolishr
.
You can install starpolishr from github with:
# install.packages("devtools") devtools::install_github("ChandlerLutz/starpolishr")
starpolishr
functions is a
stargazer
table, allowing for easy compatibility with
the
magrittr %>%
.starpolishr
package begin with
star_
for easy tab
completion in emacs or rstudio.Here is a list of key starpolishr
functions in order of how often I
use them. See their help files for more details.
star_tex_notes
-- Adds custom notes using either the
latex caption or the
latex threeparttable.star_tex_write
-- writes latex tables to a file and optionally
adds header files and common packagesstar_lhs_names
and star_rhs_names
-- updates variable names
using regular expressions. The advantage of these functions is that
they allow for variable names to span more than one line.star_panel
-- panels multiple related stargazer
tables into a
single latex table.star_insert_row
-- insert a row after a given row in a stargazer
tablestar_sidewaystable
-- converts a latex table to a latex
sidewaystable
star_add_column_numbers
-- if you pass a matrix to stargazer
, it
won't add column numbers. This function will add column numbers to a
latex table.GPL (>= 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.