[R] Finding (Ordered Subvectors)
Nikhil Kaza
nikhil.list at gmail.com
Tue Sep 21 12:43:28 CEST 2010
Convert to strings and use grep functions.
using c for variable is a bad idea.
a <- paste(a, collapse="")
b <- paste(b, collapse="")
d <- paste(d, collapse="")
grepl(b,a)
grepl(d,a)
Nikhil Kaza
Asst. Professor,
City and Regional Planning
University of North Carolina
nikhil.list at gmail.com
On Sep 21, 2010, at 6:31 AM, Lorenzo Isella wrote:
> a<-c(1,4,3,0,4,5,6,9,3,4)
> b<-c(0,4,5)
> c<-c(5,4,0)
More information about the R-help
mailing list