I have Shiny app with a reactive expression structured like this:
doStuff <- reactive({
# Some code here
output$downloadmyplots <- downloadHandler(
# What to do here?
)
})
The section "Some code here" produces an object x, which is a list of ggplot objects. The object downloadmyplots is a downloadButton in ui.R. I'd like to put the ggplot objects in x in a single PDF document, one plot per page, then let the user download it. How might I go about doing this?