[R] Date format in plot
swertie
v_coudrain at voila.fr
Wed Sep 2 08:09:25 CEST 2009
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 NA NA NA NA NA NA NA
The date corresponding to 39939 is really 06.05.2009, so it doesn't match R
format.
I tried to use
names(Date)<-c("06.05","07.05","11.05","19.05","20.05","22.05","23.05","24.05","28.05","29.05","31.05","03.06","04.06","09.06","10.06","12.06","14.06","17.06","24.06","29.06","30.06","01.07","26.07","27.07","29.07","04.08","05.08","12.08","13.08","14.08","17.08","18.08","19.08","27.08","28.08")
plot(Date, Phenology_VE[,3], ylim=range(0, 16),
main=names(Phenology_VE[3]),xaxt="n", yaxt="n")
axis(1, labels=names(Date), at=Date)
It works more or less, but I don't get regular intervals, but a thick for
each date. Do you have any idea how I could represent only some dates?
Thank you
--
View this message in context: http://www.nabble.com/Date-format-in-plot-tp25244066p25252150.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list