我已经下载了 MikTex。我已经安装并加载了“knitr”。我将文件保存为“.tex”和“.rnw”。我不断收到以下错误:“LaTex 错误:环境表未定义”,以及其他错误。我可以使用其他环境(例如“article”)制作 pdf 文档。“table”不是基本命令吗,还是我需要“table”环境的包?这里发生了什么?
% Table created by stargazer v.5.2 by Marek Hlavac, Harvard University. E-
mail: hlavac at fas.harvard.edu
% Date and time: Thu, Feb 01, 2018 - 9:13:45 PM
\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]
emoreg & 270 & 2.043 & 0.817 & 0.000 & 3.000 \\
treat & 270 & 0.604 & 0.490 & 0 & 1 \\
bullying & 270 & 0.755 & 0.559 & 0.000 & 2.571 \\
timetran & 270 & 8.281 & 7.233 & 0 & 90 \\
playsup & 270 & 4.459 & 0.619 & 1 & 5 \\
\hline \\[-1.8ex]
\end{tabular}
\end{table}