Please ask your questions about R Markdown here.I have the RMarkdown package installed, even though I read that RStudio (4.0.2) installs it and loads it anyway.
I run my chunks and everything works fine, but when I come to knit, R opens the RMarkdown console, with this error, even though I can see it's installed.
I have found similar questions about this error with other packages, but RMarkdown is critical to the knit process so I don't get why Knit throws this error
Error in loadNamespace(name) : there is no package called 'rmarkdown'
Calls: :: ... loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
Execution halted
Where do I need to install the rmarkdown package to?
For the source of the issue with the knit button, this is a little confusing to me. The only difference between rmarkdown::render() in your console and clicking the knit button is that the button runs render in a new session.
Yihui has some discussion of what's going on with here
I found out the render command worked correctly from the console, but the knit button did not even if they should do the same thing. So the problem was not rmarkdown, it was knitr calling rmarkdown.
So I deleted and reinstalled knitr and everything works well.
If your question's been answered (even by you!), would you mind choosing a solution? It helps other people see which questions still need help, or find solutions if they have similar problems. Here’s how to do it: