Cannot knit PDF in RStudio 4.0

I am running RStudio with R 4.0.4 on Windows 10 64-bit.
Created an .rmd file but cannot knit PDF from it. Can't knit HTML either. The message is as below.
I have installed knitr, yaml, tinytex, rmarkdown, tools, utils packages and updated them all. Also, installed MiKTeX. RStudio Global Option -> sweave uses knitr and pdLaTeX.

There is no install.packages anywhere in the rmd file.

Error: 2:55: unexpected string constant
4: install.packages('
Execution halted


This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.

Sorry for the delay.

Do you still have issue with last RStudio and RMarkdown ?

No thanks, I figured out the issue later that same day. I thought I had posted my solution to the question, though do not see it here now. The error was quite misleading.

1 Like