繁体   English   中英

在R中的htmlTable中对齐脚注

[英]Align footnote in htmlTable in R

我试图在R中使用htmlTable包创建一个表,我发现很难将脚注对齐到表的左下底部。

以下是相关代码:

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>

它实际上是完美的。

谢谢!

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM