I would like to find a vector inside another vector. I will always look for vectors with only 'ones' inside the vector of zero and ones. For example c(1,1,1) inside c(0,0,1,1,1,0,1). I have already came up with a solution for this:
grepl(paste(x1,collapse=";"),paste(x2,collapse=";"))
The issue is i want to search for exact the vector so
c(1,1) inside c(0,1,1,0) --> TRUE
c(1,1) inside c(0,1,1,1) --> FALSE