1

It would be great to select multiple rows using a shortcut (e.g. shift+click) instead of having to click each row individually.

Thanks in advance!

Ketty
  • 811
  • 10
  • 21
  • What is your question? – Roman Luštrik Jul 18 '17 at 05:51
  • You need to use javascript: https://stackoverflow.com/questions/23599268/include-a-javascript-file-in-shiny-app https://stackoverflow.com/questions/17964108/select-multiple-html-table-rows-with-ctrlclick-and-shiftclick – user5029763 Jul 18 '17 at 14:20
  • @user5029763, do you mind elaborate further? I am not familiar with javascript. Where should I put the javascript code from the link you provided? in ui or server.R? Here is my relevant code in ui.R: column(DT::dataTableOutput('allVars2'), width = 4). Here is my relevant code in server.R: DT::datatable(as.data.frame(colnames(rawdata())), colnames = "Variable Names", options = list(paging = FALSE, searching = FALSE)). Thanks so much! – Ketty Jul 18 '17 at 15:10
  • It's easier to write the javascript code on an independent file. The first link I posted explains how to add javascript code to a shiny project that way. – user5029763 Jul 18 '17 at 16:32

1 Answers1

0

No that I know off. Maybe you could create the functionality yourself? For example, create an observeEvent input$your_datatable_rows selected, and set

input$your_datatable_rows selected < - seq(
min(input$your_datatable_rows selected), 
max(input$your_datatable_rows selected)

But maybe someone else has a better solution, hope this helps.

Florian
  • 24,425
  • 4
  • 49
  • 80