0
我R中有一個數據幀,我創建這樣的:xtable在R:無法擺脫的行號
estimate1 = rep(1,times=4)
standardError = rep(2, times = 4)
pvalue = runif(4, min=0, max=1)
rowNames =c('Thing1','Things2','Thing3','Thing4')
tableResults = as.data.frame(cbind(rowNames, estimate1, standardError, pvalue))
當我嘗試使用寫入到一個文本文件:
xtable(tableResults, include.rownames=FALSE)
我得到:
\begin{tabular}{rllll}
\hline
& rowNames & estimate1 & standardError & pvalue \\
\hline
1 & Thing1 & 1 & 2 & 0.624112528283149 \\
2 & Things2 & 1 & 2 & 0.516147756483406 \\
3 & Thing3 & 1 & 2 & 0.756535144057125 \\
4 & Thing4 & 1 & 2 & 0.0105485401581973 \\
\hline
\end{tabular}
我想不出如何擺脫第一列中的行號。我認爲「include.rownames = FALSE」會擺脫它,但這是行不通的。
修復了它。謝謝! – Eli