Chapter 2

Introducing R

IN THIS CHAPTER

Bullet Getting R and RStudio

Bullet Working with RStudio

Bullet Learning R functions

Bullet Learning R structures

Ris a computer language. It’s a tool for doing the computation and number-crunching that set the stage for statistical analysis and decision-making.

RStudio is an open source integrated development environment (IDE) for creating and running R code. It’s available in versions for Windows, Mac, and Linux. Although you don’t need an IDE in order to work with R, RStudio makes life a lot easier.

Downloading R and RStudio

First things first. Download R from the Comprehensive R Archive Network (CRAN). In your browser, type this address if you work in Windows:

cran.r-project.org/bin/windows/base/

Type this one if you work on the Mac:

cran.r-project.org/bin/macosx/

Click the link to download R. This puts the win.exe file in your Windows computer, or the .pkg file in your Mac. In either case, follow the usual installation procedures. When installation is complete, Windows users see an R icon on their desktop; Mac users see it in their Applications folder.

Both ...

Get Statistical Analysis with R Essentials For Dummies now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.