Learn R Programming

editR (version 0.2.1)

editR: Edit Rmarkdown files with instant preview

Description

This function creates a GUI to edit Rmarkdown documents and display an instant preview of the document as it is being written. Rmarkdown documents can be rendered directly from the GUI.

Usage

editR(file = NULL)

Arguments

file
The path (as a character string) to an existing .Rmd/.md file, or to a new .Rmd/.md file. If the file does not exist, it will be created when the GUI starts.

Value

This function does not return anything.

Details

If called from RStudio, it will open in the internal RStudio internet browser. If called from a terminal, it will open in your default internet browser. editR should work without any problem with the internal RStudio internet browser, as well as with recent versions of most internet browsers. It is likely to break with older versions.

Examples

Run this code
# Create and edit a new Rmarkdown document in the current working directory
editR("example.Rmd")

Run the code above in your browser using DataLab