在 R 中的 htmlTable 中对齐脚注
Align footnote in htmlTable in R
我正在尝试使用 R
中的 htmlTable
包创建一个 table,我发现很难将脚注与 table 的左下角对齐.
相关代码如下:
library(htmlTable)
# Create a sample matrix
output <- matrix(rep(paste("xx (xx.x)"),times = 36),
ncol=3, byrow = TRUE)
# Generate htmlTable outputs
tblOutput <- htmlTable(output,
header = c("Group A", "Group B", "Goup C"),
rnames = paste0("Row name", 1:12),
css.rgroup = "text-align: left; font-weight: 10;",
css.cgroup = "line-height: 2px;",
css.tspanner = "font-weight: 10; text-align: left;",
caption = "Title name",
tfoot = "- Details about row name 1")
# Return table in html format
htmlTableWidget(tblOutput,number_of_entries = 10)
谢谢!
终于发现如果把tfoot = "- Details about row name 1"
换成下面的:
"<div align='left'> Information about row name 1 </div>
它实际上会完美运行。
谢谢!
我正在尝试使用 R
中的 htmlTable
包创建一个 table,我发现很难将脚注与 table 的左下角对齐.
相关代码如下:
library(htmlTable)
# Create a sample matrix
output <- matrix(rep(paste("xx (xx.x)"),times = 36),
ncol=3, byrow = TRUE)
# Generate htmlTable outputs
tblOutput <- htmlTable(output,
header = c("Group A", "Group B", "Goup C"),
rnames = paste0("Row name", 1:12),
css.rgroup = "text-align: left; font-weight: 10;",
css.cgroup = "line-height: 2px;",
css.tspanner = "font-weight: 10; text-align: left;",
caption = "Title name",
tfoot = "- Details about row name 1")
# Return table in html format
htmlTableWidget(tblOutput,number_of_entries = 10)
谢谢!
终于发现如果把tfoot = "- Details about row name 1"
换成下面的:
"<div align='left'> Information about row name 1 </div>
它实际上会完美运行。
谢谢!