python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
How to flag the values of a column based on values of another column in R by using rollapply?
I have a data frame, like this:
df <- data.frame (T = c(1:20), L = c(1,2,9,4,6,8,3,4,2,5,2,5,9,10,3,5,1,1,2,2))
I want to Flag a T value Ti (and also Ti−1 and
Ti+1) if Li is bigger than 6 (i.e. ...
Faranak omidi
Votes: 0
Answers: 2