> n = 2
>
>
> sort( rep( seq(as.Date("2000/1/1"), by="month", length.out=3), n ) )
>
Hi,
Try
rep(seq(as.Date("2000/1/1"), by="month", length.out=3), each = 2)
and see ?rep for more info.
HTH,
Jorge.-
On Mon, Nov 21, 2011 at 1:16 AM, arunkumar <> wrote:
> Hi.
>
> I need to generate a sequence of date, I need to generate date for a
> period. Each date should be generated
Thanks. Please expect more newbie questions!!
Satish
-Original Message-
From: jim holtman [mailto:jholt...@gmail.com]
Sent: Wednesday, October 28, 2009 7:05 AM
To: Vadlamani, Satish {FLNA}
Cc: R-help@r-project.org
Subject: Re: [R] Generating sequence of dates
try this:
> curr
try this:
> current = as.Date("2009/10/25")
> start <- seq(current, by='-1 week', length=2)[2]
> seq(start, by='1 week', length=10)
[1] "2009-10-18" "2009-10-25" "2009-11-01" "2009-11-08" "2009-11-15"
"2009-11-22" "2009-11-29" "2009-12-06" "2009-12-13"
[10] "2009-12-20"
>
On Wed, Oct 28, 2009 a
4 matches
Mail list logo