search for: exmplstr

Displaying 1 result from an estimated 1 matches for "exmplstr".

Did you mean: exclstr
2012 Feb 15
7
matching a sequence in a vector?
Hi All, I've been trawling through the documentation and listserv archives on this topic -- but as yet have not found a solution. I'm sure this is pretty simple with R, but I cannot work out how without resorting to ugly nested loops. As far as I can tell, grep, match, and %in% are not the correct tools. Question: given these vectors -- patrn <- c(1,2,3,4) exmpl <-