Then you can use c() to add the indices of those weeks which are not "complete", or use something like this
# from Tuesday to next Wedsday > !(2:10 %% 7) %in% c(0,6) [1] TRUE TRUE TRUE TRUE FALSE FALSE TRUE TRUE TRUE Yihui On Thu, Sep 11, 2008 at 5:08 PM, Weiyang Lim <[EMAIL PROTECTED]> wrote: > Hi, > > Thanks for the reply. I also thought of your method. But it will not be quite > right if my starting day is not on a Monday. Then, it will include weekends? > Hope to have flexibility in that the starting day can be any day of the week > not just monday. > > 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.