title: R error saving ggplot pdf
body: <p>When I try to save a plot made using ggplot as a pdf using this code:</p>
  <pre><code>library(ggplot2)
  
  file = &quot;/data/mda/20150630-1Mb-full_comparison-low_depth_hTERT/result/comparison_figure/SD_rank_custom.csv&quot;
  figure_file = &quot;/data/mda/20150604-1Mb-full_comparison-low_depth_hTERT/result/comparison_figure/SD_rank_custom.pdf&quot;
  
  sd_data &lt;- as.data.frame(read.csv(file, header=TRUE))
  
  # generate box plot
  ggplot(
      data=sd_data,
      aes(
          x=Experiment, 
          y=SD
      )
  )+  
  theme_bw() + #use bw theme
  geom_boxplot(outlier.shape = NA) + #hide outlier points
  geom_jitter() + 
  theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1))   
  
  ggsave(
    filename=figure_file,
    width=10,
    height=10
  )
  </code></pre>
  <p>I get the following error:</p>
  <blockquote>
  <p>Error in grDevices::pdf(..., version = version) :</p>
  <p>cannot open file 'file.pdf'</p>
  <p>Calls: ggsave -&gt; device -&gt; </p>
  <p>Execution halted</p>
  </blockquote>
  <p>I think my version of R was recently updated to 3.2.0, and I've confirmed that it works fine in v3.1.1 so I'm assuming this is version related.  I also confirmed I can write a csv file to the directory.</p>
  <p>Any ideas how to fix this?</p>