I am trying to create a table using htmlTable
package in R
and I find it difficult to align the footnote to the left bottom bottom of the table.
Below is the relevant code:
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)
Thanks!
I finally found out that if tfoot = "- Details about row name 1"
is replaced by the following:
"<div align='left'> Information about row name 1 </div>
It will actually work perfect.
Thanks!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.