Why do I have to install RMarkdown to knit?

There's a marked solution for this issue here:

Try running

library(rmarkdown)
render("path/to/file.Rmd")

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

2 Likes