Reputation: 195
Is there a elegant way to automatically trigger rendering of a Rmd file, if it has changed ?
Better still, is it possible to preview markdown dynamically in Rstudio ?
Upvotes: 1
Views: 633
Reputation: 30114
Yes, you can use the servr package. Just type servr::rmdv2() or with the argument daemon = TRUE in RStudio, and your HTML output will be automatically refreshed in the RStudio viewer as you save the source document.
servr::rmdv2()
daemon = TRUE