s-news
[Top] [All Lists]

simple question

To: s-news@wubios.wustl.edu
Subject: simple question
From: Eric yang <yang_eric9@yahoo.com>
Date: Fri, 24 Mar 2006 08:18:40 -0800 (PST)
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=kPszj9E9qoDgf2V/CcXnDH7zjxAETSHYyHfg7K4HgfFhCYLYYJ6IVdqzsjvzBnMllARmCB0cxJS9ILdRl8q5i9AxAJudshvZk1vhXTQK94CrLZUmpKLHTK9TQbzvRjOtv93rPA3cu1wvQOEc12JJ6RIT/v0IZqwwSjVqBDF1Pmw= ;
 
Dear all,
 
Can someone help me with a very simple question. Suppose I have the dates
 
 
my.dates <- c("03/01/05", "04/01/05", "05/01/05", "06/01/05", "07/01/05", "08/01/05", "09/01/05", "10/01/05", "11/01/05", "12/01/05", "01/01/06", "02/01/06", "03/01/06", "04/01/06", "05/01/06", "06/01/06", "07/01/06", "08/01/06", "09/01/06", "10/01/06", "11/01/06")
 
 
and I want to split the my.dates into a sequence related to the quarterly period, i.e. grouping into ("01", "02", "03"), ("04", "05", "06"), ("07", "08", "09") and ("10", "11", "12")
 
to give
> my.sequence
[1] 1 2 2 2 3 3 3 4 4 4 5 5 5 6 6 6 7 7 7 8 8
Thanks in advance for any help.
 
Regards
Eric


New Yahoo! Messenger with Voice. Call regular phones from your PC and save big.
<Prev in Thread] Current Thread [Next in Thread>