I have created a data frame z.
a = c(1,1,1)
b = c("start",2,2)
c = c(3,3,3)
d = c("end",4,4)
z = data.frame(rbind(a,b,c,d))
z
How can I index to get the row numbers between "start" and "end" if I don't know how many rows are going to be between "start" and "end"? In this instance there is only one row between "start" and "end" but for the next dataset there may be 50 rows between "start" and "end". Is there a way to use "start" and "end" to extract all the rows between them?