title: Segment facet_wrap into multi-page PDF
body: <p>I have searched around for a solution to this, but it appears that most deal with individually generated plots being combined into PDF format, rather than separating out plots generated using faceting onto separate pages of a PDF. </p>
  
  <p><a href="https://drive.google.com/file/d/0B8KPGzjWWaw7V0s3UG0waVJIc0E/edit?usp=sharing">Example Data</a></p>
  
  <p>In the above data using the following code, selecting all items in the generated list:</p>
  
  <pre><code>Ex&lt;-read.csv("StackOverflowEx (3).csv")
  library(ggplot2)
  library(reshape2)
  vars &lt;- select.list(names(Ex),multiple=TRUE,graphics=TRUE)
  Cases&lt;-subset(Ex,select=vars)
  
  gg&lt;-melt(Cases,id=c("Item","Total","Admin"))
  print(ggplot(gg, aes(x=Total,y=Admin))+
    geom_point(colour="dark green",size=1.5)+
    geom_point(aes(y=value,color=variable))+
    geom_smooth(aes(y=value,fill=variable),
                method=loess,size=1,linetype=1,se=T)+
    facet_wrap(~variable,ncol=2,nrow=1000)+
    ylim(0,1)+
    labs(x="Expected",y="Admin",title=vars))
  </code></pre>
  
  <p>...should generate a facet wrap of all 8 (A-H) Cases.  However, generating this tends to cramp the plots and make them less readable, and in practice, I intend to use this on 500+ cases (which just returns bars labeled with the column name with no readable charts).</p>
  
  <p>Is it possible to specify the number of charts in the faceting to appear on an individual page when converting to PDF, rather than having all plots compress into a single page?  For example, using the above data, generating two 2x2 plots on separate pages that contain all 8 cases individually (i.e. Cases A-D on pg 1, Cases E-H on pg 2).</p>
  
  <p>I could do this by highlighting 4 cases + "Item", "Total" &amp; "Admin" and repeating for the next 4 cases and combining the resultant PDFs.  However with upwards of 500 cases in practice this would mean more than 100 iterations with lots of potential for human error.  Some help with automating the process would be great.</p>