covariate.labels
需要是一个字符向量。请记住,您需要在 R 字符串中使用另一个反斜杠来转义反斜杠。
stargazer(mtcars[,1:2],covariate.labels=c("$\\beta_{0}$", "$\\beta_{1}$"))
% Table created by stargazer v.4.5.3 by Marek Hlavac, Harvard University. E-mail: hlavac at fas.harvard.edu
% Date and time: Wed, Feb 05, 2014 - 16:21:19
\begin{table}[!htbp] \centering
\caption{}
\label{}
\begin{tabular}{@{\extracolsep{5pt}}lccccc}
\\[-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]
$\beta_{0}$ & 32 & 20.091 & 6.027 & 10.400 & 33.900 \\
$\beta_{1}$ & 32 & 6.188 & 1.786 & 4 & 8 \\
\hline \\[-1.8ex]
\normalsize
\end{tabular}
\end{table}