R/vecIn.R

Defines functions vecIn.default vecIn

#########################################################################################
## returns all the positions in a where b is found.
#########################################################################################

vecIn <- function(a, b)UseMethod("vecIn")

vecIn.default <- function(a, b)
{
	which(Reduce('+', lapply(seq_along(y <- lapply(b, '==', a)), function(x){y[[x]][x:(length(a)-length(b)+x)]})) == length(b))
}   
   
   
   
   
   
   

Try the VLMCX package in your browser

Any scripts or data that you put into this service are public.

VLMCX documentation built on May 29, 2024, 11:04 a.m.