[R] Days of the week?

Gabor Grothendieck ggrothendieck at gmail.com
Thu Jan 25 03:12:24 CET 2007


You can use as.numeric(format(d, "%w")) .  See ?strptime and also
the help desk article in R News 4/1.

On 1/24/07, John McHenry <john_d_mchenry at yahoo.com> wrote:
> Hi WizaRds,
>
> What is the "standard" way to get the day of the week from a date such
> as as.Date("2006-12-01")? It looks like fCalendar has some functions
> but this requires a change in the R locale to GMT. Is there another way?
>
> Thanks!
>
> Jack.
>
>
> ---------------------------------
> Be a PS3 game guru.
>
>        [[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
> and provide commented, minimal, self-contained, reproducible code.
>



More information about the R-help mailing list