以下のコードを使用して、Shiny でテーブルの行名を出力できません。
library(shinydashboard)
library(shiny)
myData <- matrix(
data=c('13,867','$229,153','30,128','$16.53','98.17%','39.69%'),
nrow = 6, ncol = 1, dimnames = list(letters[1:6], c("Metrics"))
)
ui <- dashboardPage(
dashboardHeader(),
dashboardSidebar(),
dashboardBody(
box(dataTableOutput("table"))
)
)
server <- function(input, output) {
output$table <- renderDataTable({
myData
})
}
shinyApp(ui, server)
そして、私が得る出力を以下に示します。誰か間違いを指摘してくれませんか?