1
我想創建一個表,使用htmlTable
包在R
,我發現很難將腳註對齊到左下方的表底部。在HTML表中對齊腳註在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)
謝謝!