I need to create 12 variables starting from a certain date t1, increasing each one by 3 months.
Here's an example:
t1 t2 t3
01-01-2000 01-04-2000 01-07-2000
I've tried something like this (with package lubridate
):
for (i in 1:12) {
month(AAA$t(i+1)) <- month(AAA$t(i)) + 3 }
But I'm obtaining:
Error in as.POSIXlt(x) : attempt to apply non-function