Get startedGet started for free

Fix incorrect code

Recall the US_births_2000_2014 data set in the fivethirtyeight package used in the 2016 article from FiveThirtyEight.com entitled "Some People Are Too Superstitious To Have A Baby On Friday The 13th" here.

This exercise is part of the course

Effective Data Storytelling using the tidyverse

View Course

Exercise instructions

  • Fix the code given to focus on only data corresponding to 2013 births using a function in the dplyr package.
  • Remember to load all needed packages.
  • Assign the name US_births_2013 to this smaller data frame
  • Note that year is a numeric variable so you shouldn't have quotation marks around the value(s) of year you specify.

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

library()
library()
US_births_2013 -> US_births_2000_2014 %>% 
  filter(year = "2013")
Edit and Run Code