[R] Generating sequences of dates

Jagat.K.Sheth at wellsfargo.com Jagat.K.Sheth at wellsfargo.com
Fri Nov 30 17:04:03 CET 2012


?seq.Date

> seq(as.Date("2000-01-01"), len=5, by="1 mon")
[1] "2000-01-01" "2000-02-01" "2000-03-01" "2000-04-01" "2000-05-01"

> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of Vasilchenko Aleksander
> Sent: Friday, November 30, 2012 6:27 AM
> To: r-help at r-project.org
> Subject: [R] Generating sequences of dates
> 
> Hello,
> 
> I have the starting date in UNIX_TIME LONG number (number of
> milliseconds
> since 1970 jan 1st).
> 
> Is there a way to generete the sequence of dates with monthly interval
> in
> POSIXct format like
> 
> 2000-01-01
> 2000-02-01
> 2000-03-01
> 
> etc
> 
> Thanks
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at 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.




More information about the R-help mailing list