Menu

Setting Up R: Installation and First Program

Setting Up R

Installing R and RStudio

Follow these steps in order. If an installer asks for permissions, accept the default options.

  1. Go to the official R website, download R for your system, and install it.
  2. Go to the Posit website, download R for your system, and install it.
  3. Open RStudio. You should see a console, an editor, and a files panel.

Note: Always install R before RStudio, because RStudio needs R to run.

Creating Your First R Project

In RStudio, choose File → New Project → New Directory → New Project. Give it a clear name, such as student-analysis, and choose where to save it.

RStudio creates a folder and a project file. Whenever you open that file, RStudio sets the working folder for you, so your data files are always easy to find.

Running Your First R Program

Create a script by choosing File → New File → R Script. Type the code below and press Ctrl + Enter on each line. You should see the message appear in the console.

If you see the message, your setup works. You have just run your first R program.


R for Data Science

HA

Harini A



Learn via Video Course

Data Analysis and Processing with Python using Pandas - Data Science Course Logo

Data Analysis and Processing with Python using Pandas - Data Science Course

5 hrs



Get in Touch For Details