[R] Data frame loop

2011-03-16 Thread Hosack, Michael
R users, I found a solution to my own question. I just needed to insert (j+(j-1)):(2*j) as the indices for vector s3. No need to respond. Thank you __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the po

[R] Data frame loop

2011-03-16 Thread Hosack, Michael
R users, I am trying to use a numeric vector to extract rows from a data frame. I want to extract two rows per unique WEEK (27 weeks) based on variable DOW_NUM by using pairs of vector (s3) elements in the order they appear. For example, vector initial elements 7 and 5 will be used to extract