MA206 Code Movies
A companion for the MA206 Tidyverse Tutorial
“MA 206 Code Movies” is a companion guide to the MA206 tidyverse tutorial. It dissects the Tutorial’s code pipelines and presents them step-by-step.
For discussion of the example data and functions, refer back to the MA206 Tidyverse Tutorial guide.
1. Using Tidyverse to Explore the Data
In this example:
read_csv()
read in comma separated values file
select()
choose columns
filter()
keep or drop rows
mutate()
create new variable (column)
summarise()
summarize data (sometimes used with group_by()
)
First, we use the read_csv() command to bring our data into RStudio, then we look at what the filter(), mutate(), and select() commands can do in a pipeline:
View code-movie in a new tab or below:
We can also use the summarize() command to create new variables for later use. Here, we use it to identify the mean earnings of our sample population:
View code-movie in a new tab or below: