print(xtable(x, type = "latex"),
floating = FALSE,
tabular.environment = "longtable",
file = "/Path/Filename.tex")
我使用上述代码直接从 R 输出表格。我使用 longtable 是因为我需要它跨页。但我还需要缩放它,以便它适合每一页。
我以为它会很简单:
print(xtable(x, type = "latex"),
floating = FALSE,
tabular.environment = "longtable",
scalebox = 0.7,
file = "/Users/burtonpp/Documents/Tex/InfoTrellis/tables/pipeline.tex")
但遗憾的是,这不起作用。scalebox 行导致它无法编译。
有什么想法吗?
答案1
p <- xtable(x)
align(p) <- "lp{0.5in}p{1.5in}p{1.5in}p{1in}p{1in}"
print(p,
tabular.environment = "longtable",
floating = FALSE,
file = "/path/file.tex")
这有效。