I am using knitr to write a .Rnw file and the stargazer packages to build tables for regression outputs. For the most part it is working quite well but I would like to rotate a table 90 degrees like I would easily be able to do in LaTeX using \usepackage{sidewaystable}
outside of .Rnw
\documentclass{article}
\begin{document}
<<table1, echo=FALSE, message=F, warning=F, results="asis">>=
library(stargazer)
lm1 <- lm(mpg ~ wt, data = mtcars)
lm2 <- lm(mpg ~ hp, data = mtcars)
lm3 <- lm(mpg ~ cyl, data = mtcars)
lm4 <- lm(mpg ~ disp, data = mtcars)
stargazer(lm1, lm2, lm3, lm4, title = "Basic OLS Models", omit.stat = c("f", "ser"))
@
\end{document}
rotating
package. – Giselegisella