【发布时间】:2021-09-28 18:08:39
【问题描述】:
我已经设法为单元格着色,但我还想在单元格 3 和 3 以及 8 和 9 之间画一条线。我该怎么做?
df <- data.frame(a=c(4,3,9,9),b=c(5,3,8,8))
## indices defining where the styles go
where <- rbind(c(2,1),c(2,2))
style <- rep(('background-color: orange'),2)
css.cell <- matrix('', nrow(df), ncol(df))
css.cell[where] <- style
library(htmlTable)
htmlTable(df, css.cell = css.cell)
我想要这样:
【问题讨论】:
标签: r html-table