0

I'm working on a dataset that comprises information about children aged 0-4. I would like to calculate the date they turned the age of 5.

My dataset looks like this:

  data = data.frame(
  id = c(1:4), 
  Date_of_Birth = as.Date(c("2005-10-10", "2006-11-05", "2007-11-15", "2008-12-12"))
  
)

Then, I need to create a new variable 5y_birthday that gives me the exact date that those children turned 5y.

Can anyone help me to solve that?

ph_9933
  • 97
  • 8

0 Answers0