title: Combine plots in R
body: <p>I have several plots that I want to combine them together and add a title to the combined plot, but somehow I cannot combine them using R. (using RStudio)</p>
  
  <ol>
  <li>Combine two residual plots plotted by using <code>plot(resid(lme))</code> where lme is a linear mixed model.</li>
  <li>Combine two interaction plots plotted by using <code>interaction.plot(x1,x2,y)</code> where x1 and x2 are the two independent variables, and y is the dependent variable.</li>
  </ol>
  
  <p>I tried to store the plots as variables and use <code>grid.arrange</code>, but they cannot be stored into  a variable (just produce the plot in the plot area).</p>
  
  <p>i.e.</p>
  
  <pre><code>&gt; int1 &lt;- interaction.plot(data_pos_10$Day,data_pos_10$Drug,data_pos_10$Tumor.Volume,
  +                  xlab="Day",ylab="Tumor Volume",main="Interaction Plot Batch 10",
  +                  legend=F,
  +                  col=c("red","red","green","black","blue"),
  +                  lwd=2,
  +                  lty=c(1,2,3,4,5))
  &gt; int1
  NULL
  </code></pre>