【问题标题】:Align footnote in htmlTable in R在R中的htmlTable中对齐脚注
【发布时间】:2017-02-20 11:24:39
【问题描述】:

我正在尝试使用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)

谢谢!

【问题讨论】:

    标签: r htmlwidgets


    【解决方案1】:

    我终于发现如果tfoot = "- Details about row name 1"换成下面这样:

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

    它实际上会完美运行。

    谢谢!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-08-16
      • 1970-01-01
      • 1970-01-01
      • 2021-04-28
      • 2016-04-15
      • 1970-01-01
      相关资源
      最近更新 更多