我正在使用 r 中的 stargazer 包来生成乳胶文档的摘要统计信息。但是,该函数会在表格顶部生成带有标题(标题)的乳胶代码。有没有简单的方法将标题放在表格下方?
require(stargazer)
df <- data.frame(a=c(1,2,3),
b=c(2,3,5),
c=c(8,8,9))
stargazer(df,summary = TRUE, type = "latex",
title = "summary statistic")
该函数的输出如下:
\begin{table}[!htbp] \centering
\caption{summary statistic}
\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]
a & 3 & 2.000 & 1.000 & 1 & 3 \\
b & 3 & 3.333 & 1.528 & 2 & 5 \\
c & 3 & 8.333 & 0.577 & 8 & 9 \\
\hline \\[-1.8ex]
\end{tabular}
\end{table}
请注意,标题位于表格顶部。我想要的是以下内容:
\begin{table}[!htbp] \centering
\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]
a & 3 & 2.000 & 1.000 & 1 & 3 \\
b & 3 & 3.333 & 1.528 & 2 & 5 \\
c & 3 & 8.333 & 0.577 & 8 & 9 \\
\hline \\[-1.8ex]
\end{tabular}
\caption{summary statistic}
\label{}
\end{table}
HTH安德烈亚斯