Chapter 1 – Why R and R Studio?

What they are and what they do and why we need them

Christine Monnier

Why Code?

Why am I asking you to code in R in Sociology 1205 and 2200? Is there no software that can do all this stuff with just point-and-click interfaces without all the bother? Yes, there is BUT  . . . there is value to coding and it is worth learning.

First, R and R Studio are very widely used in the fields of statistics and data science. There are good reasons for this: as mentioned below, R is open source. No one owns it. It is free to use. The main statistical software are very expensive. Also, the R language is very efficient and, dare I say, elegant in the cleaning, exploring, plotting, and modeling of data.

Lastly, I think one of the main benefits of coding is that it forces us to think about what, exactly, we are doing, rather than just, more or less mindlessly, clicking on buttons to get an output. And since both Sociology 1205 and 2200 are introductory classes, it is even more important for us to engage with that type of thoughtful examination of what we are doing and what steps we are following as we approach our data. We need to think about what we are trying to do and how we are going to do it. To develop this habit of the mind is extremely important in introductory classes, so we can then bring those skills to more advanced classes, if you choose to pursue work in the fields of statistics or data science.

R, R Studio, and R Studio Cloud

First, a basic distinction:

r logoR is the computational language that is built for statistics and data science. It is a relatively intuitive language but it still requires consistent practice to get started. R is also open-source so we do not have to buy additional pieces of software to run our data work. R is free, as well as maintained and developed by a very active community of developers.

R studioR Studio is the environment in which we will create and run our R code to explore, plot, and model data. R Studio expands the basic options available in R and streamlines a lot of the operations we need to complete in our work, such as loading up code scripts, loading up datasets, or saving our work in a shareable format. R Studio makes all that much easier.

Both R and R Studio can be installed on your computer. For R, you would go to this link and click on the download link. For R Studio, you would go to this link and choose the free R Studio desktop option that matches your operating system.

r studio cloud logoHowever, if you are taking the Sociology 1205 or 2200 at College of DuPage, we will work on in the R Studio / posit Cloud workspace specific to our class. You will find the link in your course in Blackboard.

So you do not have to install R and R Studio on your own computer. R Studio Cloud works in your browser. Just sign up for a free account using your dupage.edu email address and log in with the link posted in Blackboard. You will find your own personal workspace as well as the course workspace.

Note: since this book was written and the tutorials recorded, R Studio was renamed posit. The cloud environment we use is now named posit.cloud. However, all the links will work just fine,

License

Icon for the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License

R and R Studio For Absolute Beginners Copyright © 2022 by Christine Monnier is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License, except where otherwise noted.

Share This Book