Hi: I have a dataframe named 'spring' and I am trying to add a new variable named 'IdDate' This line of code works fine: spring$idDate <- seq(as.Date("2008-07-01"),as.Date("2009-06-30"),by="week")
But I don't want to hardcode the year because it will be used again the following year Is it possible to just generate dates with the month and day? I tried the code below: seq(as.Date("7-1","%B%d"),as.Date("6-30","%B%d"),by="week") and got this error message: Error in seq.int(0, to - from, by) : 'to' must be finite Thanks for any pointers Felipe D. Carrillo Supervisory Fishery Biologist Department of the Interior US Fish & Wildlife Service California, USA ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.