Skip to content

Instructions and Examples to Work with R on Visual Studio Code.

License

Notifications You must be signed in to change notification settings

telostat/vscode-example-R

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

R on Visual Studio Code

This repository includes instructions and examples to work with R on Visual Studio Code (VS Code).

VS Code Installation

Follow instructions on Setting up Visual Studio Code.

In particular, you can conveniently install VS Code on GNU/Linux using snap by issuing the following command (works fine if you are on Ubuntu):

sudo snap install --classic code

Quickstart

Open a terminal. Then, clone this repository:

git clone [email protected]:telostat/vscode-example-R.git

Once it is cloned, change to the root directory of the repository:

cd vscode-example-R

Install following R packages:

install.packages(c("languageserver", "lintr", "rex"))

Finally, run VS Code on the root directory (note the . after code command):

code .

Once VS Code has started, you may be prompted to install recommended extensions in case that you have not installed them yet.

See .vscode/extensions.json for recommended extensions (not only for R). One of them is commented out: Emacs Keybindings. Enable it if you are used to Emacs keybindings.

Files of Interest

  1. Example RMarkdown file: ./document.Rmd
  2. Library file: ./library.R
  3. Program file: ./execute.R

About

Instructions and Examples to Work with R on Visual Studio Code.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages