search for: fivedayslat

Displaying 1 result from an estimated 1 matches for "fivedayslat".

Did you mean: fivedayslater
2007 Jun 08
4
match rows of data frame
Hi R-experts, I have a data frame (A) , and a subset (B) of this data frame. I am trying to create a new data frame which gives me all the rows of B, plus the 5th next row(occuring in A). I have used the below code, but it gives me all 5 rows after the matching row. I only want the 5th. FiveDaysLater <- A[c(sapply(match(rownames(B),rownames(A)), seq, length=6))),] Any guidance much appreciated, Thankyou. Alfonso Sammassimo Melbourne, Australia.