I have a shiny app dashboard which does comparisons for two csv files of same layout as each other. There are the filters and conditions for the comparison on the sidebar, and the input for the drop down picker box are somethings which are dynamically updated once the two files are uploaded. The code being used is as follows. The interface before the two report files are uploaded looks like this.
After the files are uploaded, it populates the filters in the drop down box.
ui.R
pickerInput('dropdownboxVariable', 'Variable Type:', c(""), options = list('actions-box' = TRUE), multiple = TRUE)
Server.R
variabletype <- intersect(variabletype1(),variabletype2())
updatePickerInput(session, "dropdownboxVariable", choices= variabletype, selected = variabletype)
Where variabletype1 and variabletype2 are contents of a single column in the two csv files. Essentially, once shiny reads in the file and this column, it removes all duplicates and put the common list together for the interface. I cannot use the solution provided in the Related Question, since that would only allow me to statically set the number of variables I want to bolden. I do not know how many variable types I can get with each set of files to compare. I tried to get an integer value in server.R, and then to call it in the proposed solution in ui.R. But it would not work. Can this be done at all?