Files corresponding to Short Course: Introduction to Data Science Using R
We’ll continue to work on the same .Rmd file from the previous exercise.
Write a brief note using Markdown syntax that mentions we’ll be investigating the name George in more detail and that we’ll be creating a new variable that represents the change year to year.
Use the BabyNamesFull data object and filter the data to only
contain observations where sex is M and the name is George.
Create a new variable using mutate() that is the difference from
year to year for the count variable. This can be done using the
lag() function via count-lag(count). Call this variable diff.