Using 'render' on a .qmd
document from within Rstudio on Windows I get the following error:
ERROR: Error executing 'C:\Users\XXX\scoop\apps\r\current\bin\Rscript': The system cannot find the file specified. (os error 2)
Unable to locate an installed version of R.
Install R from https://cloud.r-project.org/
This is true. This directory contains R.exe
but not Rscript
, however a subdirectory called ./x64/
contains Rscript.exe
. If I copy Rscript.exe
to this directory I instead get the following error on render:
ERROR: Error executing 'C:\Users\XXX\scoop\apps\r\current\bin\Rscript': The pipe is being closed. (os error 232)
Unable to locate an installed version of R.
Install R from https://cloud.r-project.org/
quarto::quarto_inspect() yields:
Error: lexical error: invalid char in json text.
ERROR: . is not a quarto p
(right here) ------^
quarto::quarto_path() yields:
"C:\\Users\\XXX\\AppData\\Local\\Programs\\Quarto\\bin\\quarto.cmd"
Rendering the same document with Rmarkdown (ie. changing the file extension to .Rmd
) and again using the Rstudio "render" button works fine.
Based on a different thread here, I thought the problem may have been that the R project was on Onedrive, so I tried moving the project to my desktop and re-rendering it, but that didn't help.
R, Rtools and Rstudio are all downloaded using the scoop package manager. I believe that quarto docs rendered fine before I last updated Rstudio. The current Rstudio version is:
RStudio 2022.07.2+576 "Spotted Wakerobin" Release (e7373ef832b49b2a9b88162cfe7eac5f22c40b34, 2022-09-06) for Windows
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) QtWebEngine/5.12.8 Chrome/69.0.3497.128 Safari/537.36