I ran into this today. I installed R 3.4.3 along side R 3.4.1 . Using LyX/knitr under R 3.4.1 everything was fine. After adding R 3.4.3, changing the System/User/LyX PATH entries from 3.4.1 to 3.4.3, LyX launches Rscript, but it can no longer open the Rnw file in the TEMP folder. LyX freaks out and pops up an error message. My work around was to copy Rscript from R 3.4.1 and everything works again. Did the command line parameters change from R-3.4.1 toR-3.4.3 ?
Everything seems fine for Rstudio and report compilation. Do the LyX Rscript command line parameters need to be changed for R-3.4.3 ? This occurred under Windows 10 on a X64 laptop and i386 tablet. It's consistent anyway! Is there a fix for R-3.4.3 or LyX 2.2.3 ?
Updated info:
The LyX console reports the following:
18:10:32.825: Rscript --verbose --no-save --no-restore "C:/Users/dave/AppData/Local/LyX 2.2/Resources/scripts/lyxknitr.R" "C:/Users/dave/AppData/Local/Temp/lyx_tmpdir.WeWWkafx7016/lyx_tmpbuf0/""DES-knitr.Rnw" "C:/Users/dave/AppData/Local/Temp/lyx_tmpdir.WeWWkafx7016/lyx_tmpbuf0/""DES-knitr.tex" ISO-8859-15 "C:/Users/dave/LaTeX Work/Lyx Work/"
18:10:33.241: The filename, directory name, or volume label syntax is incorrect.
support/Systemcall.cpp (291): Systemcall: 'Rscript --verbose --no-save --no-restore "C:/Users/dave/AppData/Local/LyX 2.2/Resources/scripts/lyxknitr.R" "C:/Users/dave/AppData/Local/Temp/lyx_tmpdir.WeWWkafx7016/lyx_tmpbuf0/""DES-knitr.Rnw" "C:/Users/dave/AppData/Local/Temp/lyx_tmpdir.WeWWkafx7016/lyx_tmpbuf0/""DES-knitr.tex" ISO-8859-15 "C:/Users/dave/LaTeX Work/Lyx Work/"' finished with exit code 1
Error: Cannot convert file
----------------------------------------
An error occurred while running:
Rscript --verbose --no-save --no-restore $$s/scripts/lyxknitr.R
"C:/Users/dave/AppData/Local/Temp/lyx_tmpdir.WeWWkafx7016/lyx_tmpbuf0/""DES-kn…
18:10:41.526: Error while exporting format: PDF (pdflatex)
The tempfile exists and I can read it in Notepad++. Note that LyX works fine, R-3.4.3 works fine, but the LyX->Knitr->R->LaTeX-> PDF chain is broken in Rscript. For every installed R upgrade, I've changed the System/User/LyX PATH variables and everything has been fine with knitr until now. My next step is to completely uninstall LyX and R-3.4.3 and reinstall. I'm a little hesitant to proceed with that if I have a simple configuration change/error that may appear again in future upgrades to LyX (2.3) and R (3.4.3+).