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
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
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"
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
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
..@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
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
7 matches
Mail list logo