aqd14
4/14/2019 - 3:16 PM

Calculate date difference given two dates

Using difftime to calculate age

# Notes

grand_slam_ages <- player_dob %>%
    select(name, date_of_birth) %>%
    inner_join(grand_slams, by = "name") %>%
    mutate(age = as.numeric(difftime(tournament_date, date_of_birth, unit = "days") / 365.25))