Chapter 2 Installing R

In the previous chapter, you got an overview of what R is, its capabilities, and how it functions through added capabilities of shared code called “packages.” This chapter will walk the reader through the steps of installing R and R-Studio and provide an overview of its interface.

2.1 Installation

As stated earlier, this book will use R-Studio throughout, which is an IDE (Integrated Development Environment) for R. Since R is a programming language with statistical capabilities, R-Studio provides tools for developing and testing code with accompanied documentation. Although development and testing are not the focus of this book, R-Studio provides an interface that makes it easy to interact with and use the software. However, it works on top of R, which means that the user has to first download R and then R-Studio. R can work without R-Studio, but not the other way around. One may think of this as the relationship between Windows operating system and Microsoft Word which requires Windows to function.

To install R, access the R foundation webpage, and then click on download from CRAN. CRAN stands for the Comprehensive R Archive Network which is a network of computers maintained by R developers. After choosing the closest server, click on download to download the appropriate version based on the operating system of your computer. By choosing “install R for the first time,” the installer will automatically walk you through installing R on your computer. Once installed in your programs folder, you will also see a shortcut in your start menu.

Once R is installed, you can open to make sure it is working by clicking on the icon from the start menu. The interface should like what we saw in section 1.1.

To install R-Studio, you will follow a similar procedure by accessing the freely available software from R-Studio. Since the company also offers a number of different versions that are not free, please make sure to click on the IDE version of the software that is open source and free. Once installed using steps similar to the directions provided earlier, the installer will automatically provide a shortcut in the start menu to R-Studio as well. Now, you can make sure that it is working by clicking on it to open R-Studio, the interface for which should look similar to one shown earlier in section 1.2.