r - How to suppress stargazer() information in output file -
i'm using stargazer
package output r dataframe latex code:
library(stargazer) stargazer(mtcars)
and output
% table created stargazer v.3.0.1 marek hlavac, harvard university. e-mail: hlavac @ fas.harvard.edu % date , time: thu, may 09, 2013 - 16:14:28 \begin{table}[htb] \centering \caption{} \label{} \footnotesize \begin{tabular}{@{\extracolsep{5pt}}l c c c c c } \\[-1.8ex]\hline \hline \\[-1.8ex] statistic & \multicolumn{1}{c}{n} & \multicolumn{1}{c}{mean} & \multicolumn{1}{c}{st. dev.} & \multicolumn{1}{c}{min} & \multicolumn{1}{c}{max} \\ \hline \\[-1.8ex] mpg & 32 & 20.091 & 6.027 & 10.400 & 33.900 \\ cyl & 32 & 6.188 & 1.786 & 4 & 8 \\ disp & 32 & 230.722 & 123.939 & 71.100 & 472.000 \\ hp & 32 & 146.688 & 68.563 & 52 & 335 \\ drat & 32 & 3.597 & 0.535 & 2.760 & 4.930 \\ wt & 32 & 3.217 & 0.978 & 1.513 & 5.424 \\ qsec & 32 & 17.849 & 1.787 & 14.500 & 22.900 \\ vs & 32 & 0.438 & 0.504 & 0 & 1 \\ & 32 & 0.406 & 0.499 & 0 & 1 \\ gear & 32 & 3.688 & 0.738 & 3 & 5 \\ carb & 32 & 2.812 & 1.615 & 1 & 8 \\ \hline \\[-1.8ex] \normalsize \end{tabular} \end{table}
note output includes 2 lines of latex comments (top 2 lines, beginning %). how can stop top 2 lines (beginning %) being outputted?
a similar question, concerning xtable() asked here: using table caption on r markdown file using knitr use in pandoc convert pdf
from version 4.0 onwards (available on cran now), can run stargazer argument header=false omit initial comments in latex code ouput.
Comments
Post a Comment