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")
- The first argument in all
starpolishr
functions is astargazer
table, allowing for easy compatibility with the magrittr%>%
. - All of the functions in the
starpolishr
package begin withstar_
for easytab
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
andstar_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 relatedstargazer
tables into a single latex table.star_insert_row
-- insert a row after a given row in astargazer
tablestar_sidewaystable
-- converts a latex table to a latexsidewaystable
star_add_column_numbers
-- if you pass a matrix tostargazer
, it won't add column numbers. This function will add column numbers to a latex table.
GPL (>= 2)