Overview
Today we will cover the heart of tidyverse
and use it for “data wrangling”. Today will again be a lot of content thrown at you, so you can look back at this as a reference all semester. Then we will do more practice problems.
Readings
- Chs. 5, 10-12, 18 in Wickham & Grolemund, R for Data Science
References by Package/Task
tibble
readr
and importing datadplyr
and data wranglingtidyr
and tidying or reshaping data- joining data
Slides
Below, you can find the slides in two formats. Clicking the image will bring you to the html version of the slides in a new tab. Note while in going through the slides, you can type h to see a special list of viewing options, and type o for an outline view of all the slides.
The lower button will allow you to download a PDF version of the slides. I suggest printing the slides beforehand and using them to take additional notes in class (not everything is in the slides)!
R Practice
Answers from last class’ practice problems on base R are posted on that page. Today you will be working on R practice problems on data visualization. Answers will be posted later on that page.
Additional Useful Information
New Packages Mentioned
Learn more about each of these in context in the slides, but below are links to each packages’s online help pages, which include descriptions of how each function works, examples, and cheatsheets to help you
tidyverse
collection of packages, including the following:tibble
for friendlier, tidier dataframesmagrittr
for use of the pipe (%>%
)readr
,readxl
, andhaven
for importing datadplyr
for data wrangling and manipulationtidyr
for reshaping data
You can find a running list of packages we use in this course in the resources pages.