title: R: kable_as_image cannot find Ghostscript
body: <p>I'm re-running some R Markdown scripts that worked fine a month ago, but now kable_as_image is unable to find Ghostscript (yes, I'm on Windows 8). I get the following error message:</p>
  
  <pre><code>Error in kable_as_image(criteria.table,"Criteria",file_format="jpeg"): 
  Ghostscript is required to read PDF on windows. Please download it here: https://ghostscript.com/
  </code></pre>
  
  <p>My computer still has Ghostscript, which runs fine when I open it up independently (I tried reinstalling Ghostscript; it didn't help). My guess is that the problem has something to do with R, RStudio, or a package being unable to find the Ghostscript.</p>
  
  <p>I'm pretty sure I've upgraded R in the interim, and I'm currently on 3.4.3 with the latest versions of kableExtra and magick. I've also tried </p>
  
  <pre><code>Sys.setenv(R_GSCMD="C:/Program Files/gs/gs9.22/bin/gswin64.exe")
  </code></pre>
  
  <p>(and also for gswin64c.exe) but that didn't help, either. Any advice would be appreciated.</p>