Arthur Carvalho Brito
Arthur Carvalho Brito

Reputation: 560

Can stargazer follow booktabs style?

I am quite in doubt about which table formatting package to use, being xtable and stargazerthe alternatives.

I find Stargazer easier to understand when building tables - specially if a need to use column spanning. However, I do not know how to make stargazer tables in the booktabs shape. Is there a way to do so, as in xtable?

Alternatively, how can I use xtable in a way that it is easy to format spanning columns?

Upvotes: 6

Views: 1274

Answers (1)

Lino Ferreira
Lino Ferreira

Reputation: 470

The stargazer-booktabs package is a stargazer fork which adds support for the LaTeX booktabs package.

As stated on the package's webpage:

In contrast to the main package, this fork outputs tables which use the booktabs commands \toprule \midrule and \bottomrrule [sic] for horizontal rules.

Again from the package's github page, it can be installed as follows:

install.packages("devtools")
library(devtools)

install_github("markwestcott34/stargazer-booktabs")

The package's vignette provides a few examples of regression tables.

Upvotes: 5

Related Questions