title: R refers to non exisiting files during R CMD check
body: <p>I want to <code>R CMD check</code> with RStudio my package (for this question I call it <code>pkg</code>). But I get the following error message:</p>
  
  <pre><code>* preparing 'pkg':
  * checking DESCRIPTION meta-information ... OK
  * installing the package to build vignettes
  * creating vignettes ...Error in find_vignette_product(name, by = "weave", dir = docdir, engine = engine) : 
    Failed to locate the 'weave' output file (by engine 'utils::Sweave') for vignette with name 'my-vignette'. The following files exist in directory 'C:/Users/name/AppData/Local/Temp/RtmpQLnSjE/Rbuild244434d45c05/pkg/vignettes': 'my-vignette.R', 'my-vignette.Rmd'
  Execution halted
  Error: Command failed (1)
  In addition: Warning message:
  `cleanup` is deprecated 
  Execution halted
  
  Exited with status 1.
  </code></pre>
  
  <p>One first thing, where something might got wrong is that there is no folder called <code>RtmpQLnSjE</code> in my <code>C:/Users/name/AppData/Local/Temp/</code> directory. Running my Rmd file by hand, does not generate any errors.</p>
  
  <p>I update RStudio to the latest version 1.1.423 and this is my <code>SessionInfo()</code>:</p>
  
  <pre><code>R version 3.4.3 (2017-11-30)
  Platform: x86_64-w64-mingw32/x64 (64-bit)
  Running under: Windows &gt;= 8 x64 (build 9200)
  
  Matrix products: default
  
  locale:
  [1] LC_COLLATE=German_Germany.1252  LC_CTYPE=German_Germany.1252    LC_MONETARY=German_Germany.1252
  [4] LC_NUMERIC=C                    LC_TIME=German_Germany.1252    
  
  attached base packages:
  [1] stats     graphics  grDevices utils     datasets  methods   base     
  
  other attached packages:
  [1] MCMCglmm_2.25 ape_5.0       coda_0.19-1   lme4_1.1-15   Rcpp_0.12.15  Matrix_1.2-12 hmi_0.9.4    
  
  loaded via a namespace (and not attached):
   [1] lattice_0.20-35 corpcor_1.6.9   digest_0.6.15   withr_2.1.1     MASS_7.3-48     grid_3.4.3     
   [7] nlme_3.1-131    cubature_1.3-11 minqa_1.2.4     nloptr_1.0.4    devtools_1.13.4 splines_3.4.3  
  [13] tools_3.4.3     yaml_2.1.16     parallel_3.4.3  compiler_3.4.3  memoise_1.1.0   tensorA_0.36 
  </code></pre>