gpt4 book ai didi

r - 从 R Shiny renderTable 中排除行名称

转载 作者:行者123 更新时间:2023-12-03 12:30:10 24 4
gpt4 key购买 nike

我正在使用 R Shiny 包中的 renderTable 函数,它返回一个带有行名称的表。理想情况下,我希望一个表格只显示两列,一列用于“月”,另一列用于“值”。我目前得到的输出包括行名称。我尝试了一些方法来排除行名称,但没有成功。有什么想法吗?

output$valueTable <- renderTable({
if(input$table_view == TRUE){
data.frame(Month = Month(), Value = valueData()[,"Value"])
}
})

最佳答案

这条指令对我有用

output$summaryTable <- renderTable({
df()$donnees
},
include.rownames=FALSE)

关于r - 从 R Shiny renderTable 中排除行名称,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20669150/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com