我正在尝试使用htmlTable
中的包创建一个表格R
但我发现很难将脚注与表格的左下角对齐。
以下是相关代码:
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>
它实际上会完美地工作。
谢谢!