0

I am new to R and I made a rnw-file in R-Studio to create a PDF file for MikTex. The file consists of Latex-Code as well as R-Code in chunks and it has worked well before. Yesterday, I updated some packages and R-Studio and now I am getting a generell error. Even after searching for a longer time online, I couldn´t find a solution. For example, my first line starts with \documentclass{article} and I get the error "unexpected input in "\". Even when I open a totally new R-Sweave file (.Rnw) starting with \documentclass{article} it gives me the same error with the unexpected input.

The same, when I insert a chunk with R-Code starting with <<>>=, then it brings the same error "unexpected input in "<<" ".

Has anybody an idea, what could be the reason for that?

  • 1
    Any particular reason why you’re using Rnw? It’s been pretty much replaced by modern technologies, in particular knitr and RMarkdown. – Konrad Rudolph May 29 '20 at 09:48
  • Great advise. I shiftet to RMarkdown and get the PDF by knitr... and it worked. The code is working and another plus: With Sweave the graphic wasn´t included into the PDF, but now it is exactly where I wanted it to be. Thank you very much! – Hindrich May 29 '20 at 11:17

0 Answers0