jeudi 12 décembre 2019

Shiny: dinamic checkboxGroupInput

I'm building a Shiny app and I would like to add a dinamic "checkboxGroup" which depends on some other input. More precisely, the user can upload N files, the app makes some calculations, then the output is a table with N columns (one for each file uploaded). At this point I would like the user to be able to select only certain columns, i.e. the ones he/she would like to consider, then the table should update according to the user's choice.

I had a look at some shiny apps on the web, and the closest solution is probably something like https://shiny.rstudio.com/gallery/datatables-demo.html

but unfortunately in that example we have

checkboxGroupInput("show_vars", "Columns in diamonds to show:", names(diamonds), selected = names(diamonds))

where diamons is "known", whereas in my case I don't know how many files the user will upload and so how many columns my table will have.

Any ideas? Cheers




Aucun commentaire:

Enregistrer un commentaire