Re: [R] Week of the Year date conversion

2003-12-15 Thread Peter Dalgaard
Prof Brian Ripley <[EMAIL PROTECTED]> writes: > On 15 Dec 2003, Peter Dalgaard wrote: > > > Neither of those definitions coincide with ISO, BTW. > > ISO 8601 week of the year (as distinct from ISO C where these come from) > is %V, of course. Doesn't work with RedHat 8 though... -- O__ -

Re: [R] Week of the Year date conversion

2003-12-15 Thread Gabor Grothendieck
quot;, "200310" ) ) --- Date: 15 Dec 2003 13:35:37 +0100 From: Peter Dalgaard <[EMAIL PROTECTED]> To: Berwin Turlach <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]>,Barry Rowlingson <[EMAIL PROTECTED]>,Wayne Jones <[EMAIL PROTECTED]> Subject: Re: [R] Week of the

Re: [R] Week of the Year date conversion

2003-12-15 Thread Prof Brian Ripley
On 15 Dec 2003, Peter Dalgaard wrote: > Neither of those definitions coincide with ISO, BTW. ISO 8601 week of the year (as distinct from ISO C where these come from) is %V, of course. R-devel has an extended (relative to 1.8.1) description in ?strptime -- Brian D. Ripley, [E

Re: [R] Week of the Year date conversion

2003-12-15 Thread Peter Dalgaard
Berwin Turlach <[EMAIL PROTECTED]> writes: > > "BR" == Barry Rowlingson <[EMAIL PROTECTED]> writes: > > BR> Ah ha. Use '%w' for 'day of week': > > >> strptime("2003 05 06", format="%Y %U %w") > BR> [1] "2003-02-02" > > BR> I dont have a calendar to hand to check that 2 Feb i

Re: [R] Week of the Year date conversion

2003-12-15 Thread Prof Brian Ripley
On Mon, 15 Dec 2003, Barry Rowlingson wrote: > Prof Brian Ripley wrote: > > > That is not a complete date! Which day of the week is it? > > > > > >>example1<-"200301" > >>strptime(paste(example1, "1", format="%Y%U %d") > > > > > > will work, and you need to do something like that to resolve

Re: [R] Week of the Year date conversion

2003-12-15 Thread Berwin Turlach
> "BR" == Barry Rowlingson <[EMAIL PROTECTED]> writes: BR> Ah ha. Use '%w' for 'day of week': >> strptime("2003 05 06", format="%Y %U %w") BR> [1] "2003-02-02" BR> I dont have a calendar to hand to check that 2 Feb is the 6th BR> day of the 5th week It's not, it is th

Re: [R] Week of the Year date conversion

2003-12-15 Thread Barry Rowlingson
Prof Brian Ripley wrote: That is not a complete date! Which day of the week is it? example1<-"200301" strptime(paste(example1, "1", format="%Y%U %d") will work, and you need to do something like that to resolve the ambiguity. Doesn't seem to work: - 6th day of 5th week: > strptime("200

Re: [R] Week of the Year date conversion

2003-12-15 Thread Prof Brian Ripley
On Mon, 15 Dec 2003, Wayne Jones wrote: > > Hello there fellow R-users, > > I have received some data which comes in the following format: > > example1<-"200301" > > The first 4 digits correspond to the year and the remaining 2 digits > correspond to the week of the year. > I have tried to

[R] Week of the Year date conversion

2003-12-15 Thread Wayne Jones
Hello there fellow R-users, I have received some data which comes in the following format: example1<-"200301" The first 4 digits correspond to the year and the remaining 2 digits correspond to the week of the year. I have tried to convert this to a date by using strptime as follows: strptim