pedro magalhaes
pedro magalhaes

Reputation: 176

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

Upvotes: 10

Views: 6356

Answers (2)

persephone
persephone

Reputation: 420

A slight update: you can now seemlessly use Rstudio addins in VS Code. In fact, using this feature, the infinite moon reader works even better than in Rstudio (does never crash). I hence moved all my writing (markdown, rmd, and latex) and coding to VS Code.

Upvotes: 0

Ralf Stubner
Ralf Stubner

Reputation: 26823

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.

Upvotes: 7

Related Questions