我有这个data.frame,我正在尝试使用stargazer将其转换为乳胶代码:
habitats_df <- data.frame(habitat = c("beach", "grassland", "freshwater"), v1 = c(0.000, 0.670, 0.032), v2 = c(0.005, 0.824, 0.012))
library(stargazer)
stargazer(habitats_df, summary = F)
% Table created by stargazer v.4.5.3 by Marek Hlavac, Harvard University. E-mail: hlavac at fas.harvard.edu
% Date and time: Wed, Jan 22, 2014 - 11:11:44
\begin{table}[!htbp] \centering
\caption{}
\label{}
\begin{tabular}{@{\extracolsep{5pt}} ccc}
\\[-1.8ex]\hline
\hline \\[-1.8ex]
habitat & v1 & v2 \\
\hline \\[-1.8ex]
beach & $0$ & $0.005$ \\
grassland & $0.670$ & $0.824$ \\
freshwater & $0.032$ & $0.012$ \\
\hline \\[-1.8ex]
\normalsize
\end{tabular}
\end{table}
注意 stargazer 在数学模式下打印表格,因此它用 $ 括起来数字。如何阻止观星者在乳胶数学模式下打印表格?