Мне интересно, есть ли способ удалить столбец индекса (1-й столбец) из таблицы данных в Shiny.
Например, столбец (1, 2, 3) перед Имя столбца, как показано на скриншоте ниже:
Ниже мой код:
header <- dashboardHeader(
title = "Test"
)
sidebar <- dashboardSidebar(
)
body <- dashboardBody(
box(title = "Test", width = 7, status = "warning", DT::dataTableOutput("df"))
)
# UI
ui <- dashboardPage(header, sidebar, body)
# Server
server <- function(input, output, session) {
output$df = DT::renderDataTable(df, options = list(
autoWidth = TRUE,
columnDefs = list(list(width = '10px', targets = c(1,3)))))
}
# Shiny dashboard
shiny::shinyApp(ui, server)
Заранее спасибо.