[英]display row names and colnames in r shiny
我想在我的儀表板中看到列的名稱。
在我的文件ui.R中,我嘗試將row.names=TRUE
放入,但不起作用。
dashboardBody(
tabItems( tabItem(tabName="OP",(tableOutput("moyenne",rownames=TRUE)))))
並在我的文件中R:
shinyServer(function(input,output){
output$moyenne <- renderTable({
(moyenne)
})
謝謝
您想將renderTable
rownames = TRUE
傳遞給renderTable
,而不是tableOutput
:
library(shiny)
ui <- fluidPage(
tableOutput("moyenne")
)
server <- function(input, output, session) {
output$moyenne <- renderTable({
moyenne
}, rownames = TRUE)
}
shinyApp(ui, server)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.