r - make new dataframe meeting a specific criteria -
i have data frame 4 variables (a,b,c,d) , 365 entries per variable
df
a b c d a1 b1 c1 d1 . . . . . . . . a365 b365 c365 d365
i need 2 things:
1) select row meets criteria of d > 0.28 , > 2.3. did using this:
cond_1 <- d > 0.28 & > 2.3
lets say, first row meets criteria row 7. how can make new data frame starting row 7 onwards , discarding rows prior row 7? ( need include row after 7th row irrespective of whether meet criteria or not)
thanks lot
something example:
df[seq(min(with(df,which(d > 0.28 & > 2.3)))+1,nrow(df)),]
Comments
Post a Comment