1
votes

I am troubleshooting a less-experienced R user's issue. She is attempting to knit a report that I created. The error started after her laptop was re-imaged, and R/RStudio had to be re-installed. Previously she could knit the report, and I can still knit the file without an error.

The error occurs when it tries to create the file-- it's not an issue with the code. The normal procedure for knitting is to run a .R script, with rmarkdown::render() knitting the html and then writing it out to a different location with a different name. If she manually knits the .Rmd she still gets the error but the .html file with the same name as the .Rmd gets created.

rmarkdown::render("CODE\\SPEECHMINER_MAINTENANCE.RMD", output_format = "html_document", output_dir = "OUTPUT",
            output_file = paste0("SPEECHMINER_MAINTENANCE_REPORT_", format(Sys.Date(), "%Y-%m-%d"), ".html")
)

Below is her session info. As I said earlier, everything is up-to-date because they had to do a fresh install. Her RStudio is 1.2.x, I can get that if necessary.

sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 17134)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] rmarkdown_1.16

loaded via a namespace (and not attached):
[1] compiler_3.6.1  htmltools_0.4.0 tools_3.6.1     Rcpp_1.0.2      knitr_1.25      xfun_0.10       digest_0.6.21   rlang_0.4.0     evaluate_0.14

From what I've read online the typical advise is to update everything. In this case the update precipitated the problem. My system is not as updated. I'm on R 3.4.4, RStudio 1.1.x, knitr 1.22 and rmarkdown 1.12. I don't know much about how pandoc works and I'm thinking that must be the issue-- I'm sure that many folks are able to do this process successfully with the updated versions of R/RStudio/the packages.

1

1 Answers

0
votes

Today I found a solution:

In enterprise you have two repositories of file shares

  • //societe/test_X
  • J:/societe/test_X

If you open your rmd file with the first version, you'll get a pandoc runtime error, but if use the second one, it will succeed.

Remark: J is not a local repository