Skip to content

Creating 2 week intervals (lubridate)

2 messages · sparklegirl100 at hotmail.com, David Winsemius

#
On Oct 23, 2011, at 4:18 PM, <sparklegirl100 at hotmail.com> <sparklegirl100 at hotmail.com
> wrote:

            
(I must note I was very much tempted to ignore this post because of  
the mail address.)

See if this helps:

findInterval(as.Date("2000-11-01")+0:60,
        seq(from =as.Date("2000-11-20"), to=as.Date("2000-12-31"),  
by="2 week")
             )
  [1] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1  
1 2 2 2 2 2 2
[40] 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3
Please post in plain text.