[R] Julian dates

2004-01-28 Thread Massimiliano Tripoli
Hi all, I have problems with years of dates using chron package. I don't understand why R by this istruction: dates(01/02/29,out.format=d/m/year) [1] 02/Jan/2029 dates(01/02/30,out.format=d/m/year) [1] 02/Jan/1930 reads 29 as 2029 and 30 as 1930. How could I change to read 00 to 05 like 2000

Re: [R] Julian dates

2004-01-28 Thread Stefano Calza
I guess there's a bug in chron as you cannot pass the argument cut.off to year.expand. Adding ,... in chron arguments and along the code ,... to convert.dates does the trick. HIH, Stefano On Wed, Jan 28, 2004 at 11:50:11AM +0100, Massimiliano Tripoli wrote: Hi all, I have problems with

Re: [R] Julian Dates

2004-01-28 Thread Petr Pikal
Hallo On 28 Jan 2004 at 13:13, Massimiliano Tripoli wrote: Hi all, I have problems with dates format using chron package. I don't understand why R by this istruction: dates(01/02/29,out.format=d/m/year) [1] 02/Jan/2029 Well, the result probably depends on your system and locale

RE: [R] Julian dates

2004-01-28 Thread Gabor Grothendieck
options(chron.year.expand = year.expand) chron(01/02/29, out.format=year-month-day) [1] 2029-January-02 Date: Wed, 28 Jan 2004 11:50:11 +0100 From: Massimiliano Tripoli [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [R] Julian dates Hi all, I have problems with years of dates

RE: [R] Julian dates

2004-01-28 Thread Ted Harding
On 28-Jan-04 Massimiliano Tripoli wrote: Hi all, I have problems with years of dates using chron package. I don't understand why R by this istruction: dates(01/02/29,out.format=d/m/year) [1] 02/Jan/2029 dates(01/02/30,out.format=d/m/year) [1] 02/Jan/1930 reads 29 as 2029 and 30 as

RE: [R] Julian dates

2004-01-28 Thread Prof Brian Ripley
On Wed, 28 Jan 2004 [EMAIL PROTECTED] wrote: origin(dates(01/02/29,out.format=d/m/year)) month day year 1 1 1970 So why does Massimiliano's example behave as though the origin were 01/01/1930? It doesn't. It behaves as if he wrote 01/02/2029 and he intended 01/02/1929 (but

[R] Julian Dates

2003-12-15 Thread Ko-Kang Kevin Wang
Hi, I'm a bit confused how julian() works. If I understand right, it returns the number of days since the origin. I have a vector: SLDATX[1:10] [1] 1986-01-06 1986-01-17 1986-02-02 1986-02-04 [5] 1986-02-04 1986-02-21 1986-03-06 1986-03-25 [9] 1986-04-06 1986-04-10 And when I did:

Re: [R] Julian Dates

2003-12-15 Thread Uwe Ligges
Ko-Kang Kevin Wang wrote: Hi, I'm a bit confused how julian() works. If I understand right, it returns the number of days since the origin. I have a vector: SLDATX[1:10] [1] 1986-01-06 1986-01-17 1986-02-02 1986-02-04 [5] 1986-02-04 1986-02-21 1986-03-06 1986-03-25 [9]

Re: [R] Julian Dates

2003-12-15 Thread Gabor Grothendieck
= 1, year = 1986 ) ) ) all.equal(TIMESOLD,TIMESOLD2) --- Date: Mon, 15 Dec 2003 22:37:59 +0100 From: Uwe Ligges [EMAIL PROTECTED] To: Ko-Kang Kevin Wang [EMAIL PROTECTED] Cc: R Help [EMAIL PROTECTED] Subject: Re: [R] Julian Dates Ko-Kang Kevin Wang wrote: Hi, I'm a bit confused how

Re: [R] Julian Dates

2003-12-15 Thread Ko-Kang Kevin Wang
Thanks! chron() is very useful indeed. Just out of interest, is it possible to do, say in this case, the number of months (or quarters) after January 1986? i.e. use a different time interval? On Mon, 15 Dec 2003, Gabor Grothendieck wrote: What you can do to handle this timezone problem is

Re: [R] Julian Dates

2003-12-15 Thread Gabor Grothendieck
PROTECTED] To: Gabor Grothendieck [EMAIL PROTECTED] Cc: [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Re: [R] Julian Dates Thanks! chron() is very useful indeed. Just out of interest, is it possible to do, say in this case, the number of months (or quarters) after January 1986? i.e. use