[英]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.