Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Live preview for Rmarkdown documents using Rstudio

I have been using VScode as my main markdown platform for notetaking and I got really used to the live preview capabilities.

Now I have to use Rmarkdown to generate an updatable report and I would like to know if anyone knows how to generate live previews using Rstudio.

I am not happy with Vscode extensions regarding R and Rmarkdown. Visual Studio Rtools does in fact have a live preview but the IDE is a lot slower and less optimized (in my opinion) when compared to Rstudio.

Notice that i know how to knit, what i would like would be to avoid knitting everytime i need to check the document.

Thank you in advance

like image 714
pedro magalhaes Avatar asked Oct 04 '18 11:10

pedro magalhaes


1 Answers

For HTML output you can use xaringan::infinite_moon_reader(file). After this, the file will automatically be processed on saving it. From it's documentation:

Note

This function is not really tied to the output format moon_reader(). You can use it to serve any single-HTML-file R Markdown output.

like image 110
Ralf Stubner Avatar answered Oct 25 '22 14:10

Ralf Stubner