Setup R & R Markdown
Table of contents
Installation
With homebrew
:
brew install r
brew install pandoc
pandoc
is required to render R Markdown.
Install R Markdown
Open R in terminal:
> R
Capital R
.
Install rmarkdown
package:
install.packages("rmarkdown")
Set Up in VS Code
For more details, refer to this document.
R Extensions
Install extensions in VS Code.
Extension IDs:
REditorSupport.r
ms-vscode.live-server
ms-vscode.live-server
is to enable live preview of R Markdown.
Useful User Settings
...
"[r]": {
"editor.defaultFormatter": "REditorSupport.r",
"editor.formatOnSave": true
},
"[rmd]": {
"editor.defaultFormatter": "REditorSupport.r",
"editor.formatOnSave": true
},
"r.rmarkdown.preview.autoRefresh": true,
...
Tidyverse
brew install harfbuzz fribidi # Needed for textshaping package
R
> install.packages("tidyverse")