[R] working with weekdays

Henrique Dallazuanna wwwhsd at gmail.com
Mon Feb 18 14:48:08 CET 2008


Try this:

values <- seq(as.Date("2008/01/01"), as.Date("2008/12/31"), by="days")
values[format(values, "%w") %in% c(1,4)]

On 18/02/2008, lamack lamack <lamac_k at hotmail.com> wrote:
>
>
> Dear all, is it possible create, automatically, a variable with all the
> Monday and Thursday?
>
> 18/02/2008
> 21/02/2008
> 25/02/2008
> 28/02/2008
> 03/03/2008
> .
> .
> for all months
>
> Best regards
>
> JL
> _________________________________________________________________
> Confira vídeos com notícias do NY Times, gols direto do Lance, videocas[[elided Hotmail spam]]
>
> ______________________________________________
> R-help at r-project.org 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.
>


-- 
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40" S 49° 16' 22" O



More information about the R-help mailing list