有没有办法隐藏格式表的列名?我想过在闪亮的表格中隐藏列名称
- 更改格式表选项中的属性。没有在文档或SO中找到有关它的信息。
- 将标题的字体颜色更改为白色。我想这对CSS专家来说可能是一件容易的事情。我找不到作为外行的正确渠道。
也许还有另一种选择,我没有想到?感谢您的帮助提前。
下面的示例代码。右表的标题应该隐藏。
library(shiny)
library(formattable)
df <- data.frame(A = LETTERS[1:10], B = 1:10)
server <- function(input, output) {
output$table1 <- renderFormattable({
formattable(df)
})
output$table2 <- renderFormattable({
formattable(df)
})
}
ui <- fluidPage(
fluidRow(
column(6,
h6("Table with header"),
formattableOutput("table1")
),
column(6,
h6("Table without header"),
formattableOutput("table2")
)
)
)
shinyApp(ui = ui, server = server)
其他:如果有一种方法来设置单元格边框像在Excel中的 右表,对这个问题的解决方案也将不胜感激。
'DT'包可能有用https://rstudio.github.io/DT/ – user5029763