Why am I writing this article?

As a data science major, most of my work with data-science (university or side-project) happens with R and Python. I write R in the traditional R console while all my other projects are done in VSCode. So I wanted to add R to my VSCode workspace.😉

When I searched the internet on how to do that, to my awe there was no article or YouTube video which tells how. I only found one article by Ken Run in which he describes his story and recommends his tools but not on how we could set up the environment.( Also many errors popped up while doing it his way )😓

So I searched the Internet and Stack Overflow about this and I wanted to write about it so anyone who is looking for instructions, can find it right away.🥳😎

Why VSCode?

  1. VSCode has support for most of the popular languages😍
  2. The community is huge and has plugins for every kind of language💖
  3. It has integrated terminal for faster development and takes less storage and has low memory footprint. It is identical to an IDE with the correct plugins plus I didn’t want to install R Studio🙂

What do you need?

  1. VSCode : A text editor my Microsoft
  2. R Language: The traditional R run time given by CRAN
  3. VSCode R Extension by Yuki Ueda
  4. R LSP Client for VSCode by REditorSupport
  5. Radian : A 21st century R console.

How to setup?

Firstly run the following command in your traditional R console:

install.packages(“languageserver”)

Install the following extensions

  1. VSCode R Extension by Yuki Ueda

This extension integrates shortcuts and other key-bindings to run the code directly in the workspace or editor. You can view your environment and also see dataframes with a single click.

Image for post

2. R LSP Client by REditorSupport

This extension provides linting, autocomplete and function signatures along with proper function definitions and information. This extension helps you autocomplete the function parameters by hinting the parameter names and types. It also gives intelligent suggestions on the scope of the variables in custom functions that you define.

#data-science #data-tools #data-analytics #data analysis

A fresh start for R in VSCode
3.80 GEEK