R installation guide

4
R Installation Guide Prof. Dr. Jan Kirenz

Transcript of R installation guide

Page 1: R installation guide

R Installation GuideProf. Dr. Jan Kirenz

Page 2: R installation guide

Prof. Dr. Jan Kirenz

(1) Downloading and Installing R

l WINDOWS

l Open http://www.r-project.org/ in yourbrowser.

l Click on “CRAN”. You’ll see a list of mirrorsites, organized by country.

l Select a site near you. l Click on “Windows” under “Download and

Install R”. l Click on “base”. l Click on the link for downloading the latest

version of R (an .exe file). l When the download completes, double-click

on the .exe file and answer the usualquestions.

l OS X

l Open http://www.r-project.org/ in your browser.

l Click on “CRAN”. You’ll see a list of mirror sites, organized by country.

l Select a site near you.

l Click on “MacOS X”.

l Click on the .pkg file for the latest version of R, under “Files:”, to download it.

l When the download completes, double-click on the .pkg file and answer the usual questions.

2

Installation Step 1: R installation

Source: Teetor, P. (2011). R Cookbook. Sebastopol, CA: O’Reilly Media.

Page 3: R installation guide

Prof. Dr. Jan Kirenz

(2) Downloading and Installing R Studio (editor)

l RStudio is a free and open-source integrateddevelopment environment (IDE) for R, a programming language for statisticalcomputing and graphics.

l Go to RStudio Download: https://www.rstudio.com/products/rstudio/#Desktop

l Click the Download RStudio Desktop button.

l Select the installation file for your system.

l Run the installation file.

3

Installation Step 2: RStudio Editor

Page 4: R installation guide

Prof. Dr. Jan Kirenz

(3) Starting RStudio

l Start Rstudio by clicking the Rstudio icon

l When you start RStudio, it opens a newwindow.

l Rstudio has useful features such as syntaxhighlighting and tab for suggested codeauto-completion.

l It has a four-pane workspace, which bettermanages multiple R windows for typingcommands, storing scripts, viewingcommand histories, viewing visualizationsand more.

4

Start RStudio