Hi,
I'm trying to check which checkbox in the row of the datatable is checked in r shiny.
I'm using the following code, I want to get check which element of the datatables are checked.
library(DT)
library(shiny)
ui <- fluidPage(
fluidRow(
dataTableOutput("datatable"),
uiOutput("radio"))
)
server <- function(input, output) {
m = matrix(
as.character(1:5), nrow = 12, ncol = 5, byrow = TRUE,
dimnames = list(month.abb, LETTERS[1:5])
)
for (i in seq_len(nrow(m))) {
m[i, ] = sprintf(
'',
paste0(month.abb[i],'_',m[i, ]),month.abb[i], m[i, ]
)
}
output$datatable <- renderDataTable({
datatable(m,escape = FALSE,options = list(dom = 't', paging = FALSE, ordering = FALSE))
})
}
shinyApp(ui, server)