[R] How to test if there is a subvector in a longer vector

Atte Tenkanen attenka at utu.fi
Thu Sep 27 23:00:26 CEST 2012


Hi,

There are certainly several ways to test, whether a longer vector includes a subvector. 
For instance, c(1,4,6) is included in c(2,1,1,4,6,3). How to test this and which would be the fastest way to do it?

Best,

Atte Tenkanen, FT, MuM
http://users.utu.fi/attenka/


More information about the R-help mailing list