[R] How canI convert date-time to Julian date?

2004-04-02 Thread Martina Azaroglu
Hello!! I need some help! I tried everything, but nothing worked! I have a vector c with dates in it, in the format 2004-04-01 and i need to convert it in the form 04/01/2004 or 01/04/2004 ! How can i do that?? Thanks Bye Martina -- __ [EMAIL

Re: [R] How canI convert date-time to Julian date?

2004-04-02 Thread Prof Brian Ripley
On Fri, 2 Apr 2004, Martina Azaroglu wrote: I need some help! I tried everything, but nothing worked! I am sure you did not try _everything_, but it would have been helpful to give some idea of what you were trying. I have a vector c with dates in it, in the format 2004-04-01 and i need to

Re: [R] How canI convert date-time to Julian date?

2004-04-02 Thread Gabor Grothendieck
Convert your character dates to one of R's date classes (POSIXlt, chron or the new Date class in 1.9.0) and then format the date. The m/d/y format you want is actually the default format in chron: z - c( 2004-01-20, 2004-02-22 ) # test vector # load chron and set default year to 4 digits