1

我正在尝试使用htmlTablepackage in创建一个表格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)

谢谢!

4

1 回答 1

0

我终于发现 iftfoot = "- Details about row name 1"替换为以下内容:

"<div align='left'> Information about row name 1 </div>

它实际上会完美运行。

谢谢!

于 2017-02-20T11:56:08.813 回答