Exercises 8 - tidyr

Files corresponding to Short Course: Introduction to Data Science Using R

Exercises 8 - tidyr

We’ll continue to work on the same .Rmd file from the previous exercise.


8.1 Widening Data

  1. We are going to ‘widen’ that data by taking the observations for the names ‘Shannon’ and ‘Lindsay’ and make one row that has the counts for both M and F observations. Add a brief section of text corresponding to this goal.

  2. Filter the BabyNamesFull data object to only include the names ‘Shannon’ and ‘Lindsay’. Then use the pivot_wider() function to create a wider data set as noted above.