使用print.xtableList
打印时,行名已更改(添加了一些数字以区分它们)。
请注意第二个表格中的lgw.v1
,应为lgw.v
有人知道如何解决此问题吗?
% latex table generated in R 3.4.4 by xtable 1.8-4 package
% Tue Oct 29 15:31:10 2019
\begin{table}[ht]
\centering
\begin{tabular}{rrrrrr}
\multicolumn{6}{l}{kappa=1.0}\\
\hline
& mean & sd & median & min & max \\\hline
lgw.v & 8.1 & 0.68 & 8.13 & -7.73 & 22.56 \\
lge.v & 20.87 & 4.44 & 20.89 & 4.17 & 40.18 \\
atom.v & 21.96 & 4.22 & 21.93 & 6.53 & 40.30 \\
gg.v & 21.74 & 4.34 & 21.72 & 5.01 & 40.18 \\
rand.v & -1.12 & 6.22 & -0.90 & -28.00 & 21.40 \\
\hline\\
\multicolumn{6}{l}{kappa=1.1}\\
\hline
& mean & sd & median & min & max \\\hline
lgw.v1 & 11.33 & 3.58 & 11.31 & -7.54 & 27.37 \\
lge.v1 & 25.07 & 4.40 & 25.16 & 6.91 & 42.36 \\
atom.v1 & 26.62 & 3.94 & 26.68 & 8.30 & 42.54 \\
gg.v1 & 26.45 & 3.99 & 26.51 & 10.34 & 42.36 \\
rand.v1 & 3.53 & 5.57 & 3.77 & -24.83 & 22.89 \\
\hline\\
\multicolumn{6}{l}{kappa=1.2}\\
\hline
& mean & sd & median & min & max \\\hline
lgw.v2 & 15.21 & 3.45 & 15.22 & 0.96 & 29.04 \\
lge.v2 & 28.95 & 4.20 & 29.06 & 8.38 & 45.49 \\
atom.v2 & 30.60 & 3.61 & 30.64 & 9.96 & 45.77 \\
gg.v2 & 30.48 & 3.64 & 30.51 & 16.46 & 45.81 \\
rand.v2 & 6.89 & 4.98 & 7.03 & -18.67 & 26.96 \\
\hline
\multicolumn{6}{l}{}\\
\end{tabular}
\caption{comparison of kappa value for}
\label{tab::kappa-v}
\end{table}
############################################# the r code
vlist = list()
for (i in c(1:5)) {
vlist[[i]] = ll[[i]][c(1:nMethods),]
}
sNames = split(pNames, seq(nrow(pNames)))
attr(vlist, "subheadings") <- as.list(sNames)
capS = paste0("comparison of kappa value for")
xList <- xtableList(vlist, caption = capS, label = "tab::kappa-v",
align = NULL, digits = NULL, display = NULL)
print.xtableList(xList, colnames.format = "multiple", rotate.rownames = FALSE , rotate.colnames=FALSE)
我知道有一个“ sanitize.rownames.function”。但是是否有可以控制的参数?我已经尝试了几次,但是没有用。