top of page

Introduction to R & RStudio

In this tutorial, you will learn why R is such a great tool for data analysis, management, and visualization. First, you will learn the difference between R and RStudio. Second, you will learn how to download and install both R and RStudio, which are both free! Third, you will learn first-hand how to do some basic commands in R (and RStudio). Throughout this course, we will work in RStudio, which sits on top of R; as such, you need both programs downloaded on your computer. Finally, you will learn a bit about the lessR package. 

Quiz 1
Video 2 (Reading Data)

Reading Data into R

In this tutorial, we learn how to read data into R. In other words, we learn how to import data from a data file (specifically a .csv file) into R so that we can manipulate, manage, and analyze the data. R is in many cases case and space sensitive, meaning that upper- and lower-case letters hold meaning, as do the presence (or lack) of spaces in an object name. We learn how to read in your data in .csv format (which is the file format we use throughout this course) using the read.csv function from base R as well as the Read function from the lessR package. For this course, I encourage you to use the function read.csv because it does not require accessing a specific package. Finally, in this tutorial, we also learn how to set our working directory using the setwd function and how to install and access the functions in a particular R package using the install.packages and library functions, respectively.

Quiz 2
Video 3 (Subset Data)

Subset/Filter Data in R

In this tutorial, you will learn how to subset and filter datasets (data frames) in R. Specifically, you will learn how to pull out a subset of data to focus on, as well as how to remove specific variables and cases.

Quiz 3
Video 4 (Exporting Data)

Exporting Table from R to Excel

In this tutorial, we learn how to export a data table object in R to Microsoft Excel using the write.table function.

Quiz 4
Video 5 (Mac OS)

RStudio for Mac OS

This video tutorial is intended for those who use RStudio for a Mac computer. In the video, I demonstrate and explain the similarities between the Windows and Mac versions of RStudio. Functionally, RStudio operates the same for Windows and Mac operating systems.

Quiz 5
Video 6 (Saving Scripts)

Saving R Scripts

In this tutorial, you will learn how to save your R script/code as a .R file or as a .txt file.

Quiz 6
bottom of page