I have a table in R (Click on the link below (See my table here)) that shows observations of two events per day: observ1 and observ2. I would like to add a third column to that called 'check'. In column check, I should get a TRUE value if observ1 equals 1 and after 5 to 10 days, observ2 also equals 1.
As you see in the table, check value on row 14 is TRUE. The reason is that observ1 was 1 on row 6 and then after 9 days, observ2 also was 1.
I do not know how to code this in R and get out column 'check'. Appreciate any assistance!