title: Shiny R, Using the downloadButton function
body: <p>I'm trying to figure out how to use a downloadButton to download multiple content to one pdf file. I have in the ui the download button created:</p>
  
  <pre><code>downloadButton('downloadData', 'Download Data'))
  </code></pre>
  
  <p>and I am trying to get multiple plots and tables into one pdf file. I have in the server file the following  </p>
  
  <pre><code> output$downloadData &lt;- downloadHandler(
      filename = function() {
        paste('data-', Sys.Date(), '.pdf', sep=&amp;rdquo;)
      }
  </code></pre>
  
  <p>but I think this will save multiple csv files. How do i download multiple plots and tables from renders such as</p>
  
  <pre><code>output$table&lt;-renderTable({
          P.Value&lt;- c(lev.p,bart.p,turn.p,shap.p,jar.p,linm.p) 
          Test.Statistic&lt;-c(lev.s,bart.s,turn.s,shap.s,jar.s,linm.s) 
          df&lt;-data.frame(P.Value,Test.Statistic)
          rownames(df, do.NULL = TRUE, prefix = "row")
          rownames(df) &lt;- c("Levene Test","Bartlett Test","Turning Point Test","Shapiro-Wilk Test","Jarque Bera Test","Linear Model Constant Drift Test")
  
          df
    })
  </code></pre>
  
  <p>,</p>
  
  <pre><code>  output$qq.line&lt;-renderPlot({
  
      index&lt;-1:length(lg.ret.vec())
      model&lt;-lm((lg.ret.vec())~ index) 
      plot(model,which=2,main="QQ plot of the residuals",xlab="Theoretical Quantiles")             
      qqline(rstandard(model),col="black")
    })
  </code></pre>
  
  <p>,</p>
  
  <pre><code>  output$histogram&lt;-renderPlot({
  
        hist(lg.ret(),main="Histogram of log returns",xlab="Log returns")
    })
  </code></pre>
  
  <p>to name just a few.</p>