Let's say I'm trying to have the user input a data frame into R Shiny as a .RData object. I don't know how many columns it contains. I want to create a histogram for each column. If I knew the number of columns, I could just create a PlotOutput for each histogram I needed in the UI <- fluidPage() part of the code. I think the best option may be to somehow combine all the histograms into one plot object--how would I go about doing that?
You could put a select control and a single plot output in the UI. In the server, populate the select control with the list of data column names when the data file is imported (using the updateSelectInput() command) and use the value of that input to figure out which variable to plot.