[R] Problems with weekday extraction from zoo objects
Gabor Grothendieck
ggrothendieck at gmail.com
Fri Jun 23 22:24:18 CEST 2006
Please provide a reproducible example (and read the posting
guide at the bottom of each email).
On 6/23/06, Kerpel, John <John.Kerpel at infores.com> wrote:
> 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!)
>
>
>
> Best,
>
>
>
> John
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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
>
More information about the R-help
mailing list