Re: [R] Date format in plot

2009-09-02 Thread jim holtman
A reproducible example would help. What is "Phenology_VE$Date"? This works > as.Date("2009-09-01", "%Y-%m-%d") [1] "2009-09-01" Is this the date you wanted: > as.Date(39936, origin='1900-2-1') [1] "2009-06-05" On Wed, Sep 2, 2009 at 2:09 AM, swertie wrote: > > As suggested in the article R

Re: [R] Date format in plot

2009-09-02 Thread swertie
As suggested in the article R News 4/1, I used as.Date(as.character(Phenology_VE$Date), "%Y-%m-%d"), however this function returns me only "NA" values as.Date(as.character(Phenology_VE$Date), "%Y-%m-%d") [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [26] NA NA NA

Re: [R] Date format in plot

2009-09-01 Thread Gabor Grothendieck
See R News 4/1. The article on dates there discusses how they work and discusses Excel's dates as well. On Tue, Sep 1, 2009 at 1:58 PM, swertie wrote: > > Hello, I plot the abundance of a species in relation to the date. To have the > date as a continous variable I put it in the format "standard"

Re: [R] Date format in plot

2009-09-01 Thread David Winsemius
Behalf Of swertie Sent: Tuesday, September 01, 2009 12:59 PM To: r-help@r-project.org Subject: [R] Date format in plot Hello, I plot the abundance of a species in relation to the date. To have the date as a continous variable I put it in the format "standard" in excel (f.ex. 39939 means 06

Re: [R] Date format in plot

2009-09-01 Thread David Winsemius
On Sep 1, 2009, at 1:58 PM, swertie wrote: Hello, I plot the abundance of a species in relation to the date. To have the date as a continous variable I put it in the format "standard" in excel (f.ex. 39939 means 06.05.2009). R uses 39939 on the x axis, but I would like to have "06.05". I

Re: [R] Date format in plot

2009-09-01 Thread Erik Iverson
..@r-project.org] On Behalf Of swertie Sent: Tuesday, September 01, 2009 12:59 PM To: r-help@r-project.org Subject: [R] Date format in plot Hello, I plot the abundance of a species in relation to the date. To have the date as a continous variable I put it in the format "standard" in ex

[R] Date format in plot

2009-09-01 Thread swertie
Hello, I plot the abundance of a species in relation to the date. To have the date as a continous variable I put it in the format "standard" in excel (f.ex. 39939 means 06.05.2009). R uses 39939 on the x axis, but I would like to have "06.05". I tried to use as.Date as suggested in some discussion