Thank you in advance for you help.
Could you please help me to solve this questions ?
I have the following dataset.
What I need is identify all the lines for each visitors_id where the 1st touch point is "Y" and only all their visits AFTER this touch point.
-for visitor B output will be lines 14 (1st touch point with Y),5,6
-for visitor D output will be lines 8 (1st touch point with Y) and 10. Lines 11 and 3 won't be in the output as they were before the 1st touch point with channel Y (line 8)
Hope I'm clear.
Below the dataset sample I have used.
sample_data <- data.frame(date = sample(c("date1","date2","date3"), 15, replace = TRUE), visitor_id = sample(c("A","B","C","D"), 15, replace = TRUE), channel = sample(c("X", "Y", "Z"), 15, replace = TRUE))