In my Shiny App, I am attempting to use the DT
package to take an input from table A and use it to filter data in table B. However, only data from column 0 in table A is applicable as the filter value. Hence, if one clicks on column 1, the output in table B comes out empty.
My question is then, whether it is possible to force the cell_clicked
suffix to always return the value from column 0, from the row that is clicked on? Essentially i would like to return input$tabelA_cell-clicked$value
where column number is equal to 0 and rownumber is equal to input$tabelA_cell_clicked$row
I have attempted the following in the serverscript (Simplified example):
output$tabelA <- renderDataTable({datatable(Data_tabel_A)})
output$TabelB <- renderDataTable({datatable(Data_tabel_B %>%
filter(variable1 == input$tabelA[input$tabelA_cell_clicked$row,0]))
})
However, input$tabelA[input$tabelA_cell_clicked$row,0]
does not appear to return a value. Can anybody point me in the right direction?