I have a dataset
id date y
8 2017-03-03 2
7 2012-02-01 8
I want to add the number y to the date. and y is a number of year :
id date
8 2019-03-03
7 2020-02-01
I tried with this date :
tmp <- as.POSIXlt(date)
tmp$year <- tmp$year + y
date <- format(tmp)
But it's not at all the good value.
Thank you,