[R] Problems with weekday extraction from zoo objects

From: Kerpel, John <John.Kerpel_at_infores.com>
Date: Sat 24 Jun 2006 - 05:52:07 EST

Hi Folks!  

I'm struggling with dates - but enough about my personal life.....  

I have two daily time series files. In one (x) the date format is Y/m/d and the other (y) is d/m/y. I used read.zoo on both and they read into R with no problem.  

Then I use: weekdays(as.Date(x$DATE)) and get what I expect - all the days of the week in my data set.  

When I use: weekdays(as.Date(y$Date)) I get:  

Error in fromchar(x) : character string is not in a standard unambiguous format  

I've tried to set the format= in read.zoo to format="%d/%m/%Y" but this doesn't seem to solve the problem.  

What's going on here? (I'm new to these dates functions, so please be patient - I'll get the hang out of soon!)  



        [[alternative HTML version deleted]]

R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Sat Jun 24 05:58:12 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Sat 24 Jun 2006 - 08:14:38 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.