I have a vector for each participant in a study that describes their eating periods. For example Participant 1 and 2 respectively have
> eating.period.1
[1] "Day 1 (1/18/15)"" Breakfast"" Morning Snack"" Lunch"" Afternoon Snack"
[6] " Dinner"" Evening Snack""Day 2 (1/19/15)"" Breakfast"" Morning Snack"
[11] " Lunch"" Afternoon Snack"" Dinner"" Evening Snack""Day 3 (1/20/15)"
[16] " Breakfast"" Morning Snack"" Lunch"" Afternoon Snack"" Dinner"
[21] " Evening Snack""Average"> eating.period.2
[1] "Day 1 (9/16/15)"" Breakfast"" Morning Snack"" Lunch"" Afternoon Snack"
[6] " Dinner"" Evening Snack""Day 2 (9/17/15)"" Breakfast"" Lunch"
[11] " Afternoon Snack"" Dinner"" Evening Snack""Day 3 (9/21/15)"" Breakfast"
[16] " Lunch"" Dinner"" Evening Snack""Average"
How do I get the index for an eating period between Days X and X+1?