draw a subset of your data using a logical vector like this: # for 50 weeks rep(c(rep(TRUE, 5), rep(FALSE, 2)), 50)
Yihui On Thu, Sep 11, 2008 at 4:31 PM, Weiyang Lim <[EMAIL PROTECTED]> wrote: > Dear R-users, > > How do I obtain a sequence of dates consisting of only weekdays without the > weekends in R? > > In S, I can do the following: > > timeSeq(from="12/17/2007", to="8/25/2008", by="weekdays") > > I tried using looking at timeSequence (fSeries package) and seq.Date (base > package) but I do not know if I can specify "weekdays" rather than "day". > > Hope to have some assistance. > > Thank you! > > Regards, > wy -- Yihui Xie <[EMAIL PROTECTED]> Phone: +86-(0)10-82509086 Fax: +86-(0)10-82509086 Mobile: +86-15810805877 Homepage: http://www.yihui.name School of Statistics, Room 1037, Mingde Main Building, Renmin University of China, Beijing, 100872, China ______________________________________________ R-help@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.