Skip to content
Back to formatted view

Raw Message

Message-ID: <22389878.post@talk.nabble.com>
Date: 2009-03-07T17:34:35Z
From: Pele
Subject: Week value function

Hi R users,

I am looking for a date function that will give the following:
	- The number-of-week value is in the range 01-53
	- Weeks begin on a Monday and week 1 of the year is the week that
	  includes both January 4th and the first Thursday of the year.
          If the first Monday of January is the 2nd, 3rd, or 4th, the 	 
preceding days are part 
         of the last week of the preceding year.  This is similar to the
SAS's week function with option V.

I am currently using :

	date <- strptime(DATE, "%d%B%Y") 
	week <- format(date, "%W")  

but, I could not find an option for doing the above description
automatically.  Can anyone help?

Thanks in advance for any help.

-- 
View this message in context: http://www.nabble.com/Week-value-function-tp22389878p22389878.html
Sent from the R help mailing list archive at Nabble.com.