Shiny Design for Function With Many Arguments

shiny

#1

I’m looking for existing examples or ideas as I think through a design idea. I have a set of R functions where each function has many arguments. The way the current program works in R is to loop over function1 to produce some output, then function 2, then function 3, … through function 7.

The issue is that I could very easily put these into my Shiny app and run the code. But, the UI would be CROWDED with textInputs and numericInputs to pass the arguments to each function and it would be very, very cumbersome.

So, while that is conceptually possible, I’m thinking about a design where the user creates a configuration file (say as a text file or a spreadsheet) and then the arguments in that spreadsheet are parsed inside the shiny app and passed to the R functions. Again, this is quite easy and the UI would simply read in this config file and parse out the arguments in that file to the functions and the run the code.

So, what I’m looking for is examples where other app developers have dealt with either reading in configuration files to solve this problem OR they have a design concept example where many (many!) arguments can be handled in the UI and keep the UI “pretty” for lack of a better term.

Thank you in advance
Harold


#2

One idea I had to add to what I hav above is that I could scaffold a series of conditional panels in the UI for user inputs to each function. For example, there could be a series of radio buttons and when they click function1, the text inputs and numeric inputs for that function only appear in the sidebar. Then, when they choose the second function, only the inputs for that function appear on the screen and so on.