1  What is R?

“Busses are very easy to use, you just need to know which bus to get on, where to get on, and where to get off (and you need to pay your fare). Cars, on the other hand, require much more work: you need to have some type of map or directions (even if the map is in your head), you need to put gas in every now and then, you need to know the rules of the road (have some type of drivers license). The big advantage of the car is that it can take you a bunch of places that the bus does not go and it is quicker for some trips that would require transferring between busses.

Using this analogy, programs like SPSS are busses, easy to use for the standard things, but very frustrating if you want to do something that is not already preprogrammed.

R is a 4-wheel drive SUV (though environmentally friendly) with a bike on the back, a kayak on top, good walking and running shoes in the passenger seat, and mountain climbing and spelunking gear in the back.

R can take you anywhere you want to go if you take time to learn how to use the equipment, but that is going to take longer than learning where the bus stops are in SPSS.”

– Greg Snow

1.1 R

R is a language and environment for statistical computing and graphics.

That basically summarises this whole chapter.

Readers who are not interested in knowing more about R and its history can skip this chapter and move on to more practical chapters.

Well, for those who keep reading this, I guess you are interested to know more about the story of how R came to be. Do not worry, this chapter is only going to cover a short version of the history of R, so, that we can appreciate this software.

R was a successor of S language. It was developed by Ross Ihaka and Robert Gentleman at the University of Auckland in 1991. R was made known to the public only in 1993. The R version 1.0.0 was released in 2000.

1.2 RStudio and Posit

In 2009, a company known as RStudio, Inc. was founded by Joseph J. Allaire, which later developed the RStudio software. RStudio software is an integrated development environment (IDE) which helps make R more user-friendly, especially for those without a programming background. RStudio IDE is unequivocally the most commonly used IDE for R software. The company, RStudio, Inc. later changed its corporation to a public benefit corporation (PBC) in 2020, thus, known as RStudio, PBC. Subsequently, in 2022, the company changed its name to Posit Software, PBC to cater to a larger demography of the data science community.

Despite the changes in Posit company, they still strongly support the development and maintenance of RStudio IDE specifically and R in general.

1.3 Other IDEs

As you may have guessed, we going to use RStudio in this book. However, there are other IDEs available. A few that are more common are:

  1. Jupyter Notebook
  2. JupyterLab
  3. Visual Studio

Given that RStudio is initially developed for R (currently we can use Python as well in RStudio), a lot of functionalities work seamlessly with R. Thus, make it easier for R beginners and novices to use it.

1.4 Clouds

There are a few options to use R in a cloud. Meaning that we do not need to install anything on our machines.

  1. Posit Cloud
  2. Google Colab
  3. Kaggle

The first two clouds are free with limited use, though you need to make an account. Kaggle is totally free to use as far as I know. However, Kaggle does not have functions such as code completion which is very helpful to beginners. This function is available in the first two clouds.

However, if you are looking for something more familiar to RStudio, Posit Cloud is the best choice. The functionalities and the overall look of the Posit Cloud are identical to RStudio.

Figure 1.4: The interface of RStudio in Posit Cloud.

1.5 Chapter summary

In this chapter, we learn about what are R and RStudio.

1.6 Revision

  1. What is the difference between R and RStudio IDE?

  2. What is the difference between RStudio IDE, RStudio, Inc., and RStudio, PBC?

  3. What are other IDEs for R?