2.1 Installing Base-R and RStudio

To use R, we’ll need to download two software packages: Base-R, and RStudio. Base-R is the basic software which contains the R programming language. RStudio is software that makes R programming easier. Of course, they are totally free and open source.

2.1.1 Check for version updates

R and RStudio have been around for several years – however, they are constantly being updated with new features and bug-fixes. At the time that I am writing this sentence (09:48, Thursday, 23 February, 2017), the latest version of Base-R is 3.3.2 “Sincere Pumpkin Patch” (the versions all have funny names) which was released on 31 October, 2016, and the latest version of RStudio is 1.0.136 released on 21 December, 2016. If you have a (much) older version of R or RStudio currently installed on your computer, then you should update both R and RStudio to the newest version(s) by installing them again from scratch. If you don’t, then some of the code and packages in this book might not work.

To install Base-R, click on one of the following links and follow the instructions.

Operating System Link
Windows http://cran.r-project.org/bin/windows/base/
Mac http://cran.r-project.org/bin/macosx/

Once you’ve installed base-R on your computer, try opening it. When you do you should see a screen like the one in Figure 1.6 (this is the Mac version). As you can see, base R is very much bare-bones software. It’s kind of the equivalent of a simple text editor that comes with your computer.

{Here is how the base R application looks. While you can use the base R application alone, most people I know use RStudio -- software that helps you to write and use R code more efficiently!

Figure 1.6: {Here is how the base R application looks. While you can use the base R application alone, most people I know use RStudio – software that helps you to write and use R code more efficiently!

While you can do pretty much everything you want within base-R, you’ll find that most people these days do their R programming in an application called RStudio. RStudio is a graphical user interface (GUI)-like interface for R that makes programming in R a bit easier. In fact, once you’ve installed RStudio, you’ll likely never need to open the base R application again. To download and install RStudio (around 40mb), go tohttp://www.rstudio.com/products/rstudio/download/| and follow the instructions.

Let’s go ahead and boot up RStudio and see how she looks!