これを実現するにadd.to.row
は、関数のオプションを使用する必要がありprint
ます(詳細については実行?print.xtable
してください)。
これを試してください(R-Forgeの投稿から採用)
addtorow <- list()
addtorow$pos <- list()
addtorow$pos[[1]] <- c(0)
addtorow$command <- c(paste(
"\\hline \n",
"\\endhead \n",
"\\hline \n",
"{\\footnotesize Continued on next page} \n",
"\\endfoot \n",
"\\endlastfoot \n",
sep=""))
x.big <- xtable(
x,
label = "tabbig",
caption = "Example of longtable spanning several pages")
print(
x.big,
tabular.environment = "longtable",
floating = FALSE,
include.rownames = FALSE, # because addtorow will substitute the default row names
add.to.row = addtorow, # this is where you actually make the substitution
hline.after=c(-1)) # because addtorow will substitute the default hline for the first row
それは解決策の少し不器用ですが、少なくともそれはあなたにたくさんのカスタマイズを提供します。