swenze
swenze

Reputation: 21

Compile Rmarkdown outside of Rstudio

I can use the knit button to compile an Rmarkdown file to html in Rstudio.

How can I do the same in an R console?

Upvotes: 1

Views: 1219

Answers (2)

Mario Santoro
Mario Santoro

Reputation: 63

The command posted by scoa

rmarkdown::render("input.Rmd")

is ok, but outside RStudio you can receive error because pandoc version can be too old.

If so see https://github.com/rstudio/rmarkdown/blob/master/PANDOC.md

If you are on Linux you need just to link pandoc version from RStudio or RStudio Server.

Upvotes: 2

scoa
scoa

Reputation: 19867

In an R console, you can use the following command:

rmarkdown::render("input.Rmd")

Upvotes: 2

Related Questions