search for: tp2019018p2019161

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

Did you mean: tp2019018p2019108
2010 Apr 21
3
Count matches of a sequence in a vector?
Hey there, I need to count the matches of a sequence seq=c(2,3,4) in a long vector v=c(4,2,5,8,9,2,3,5,6,1,7,2,3,4,5,....). With sum(v %in% seq) I only get the sum of sum(v %in% 2), sum(v %in% 3) and sum(v %in% 4), but that's not what I need :( Who can help me? Thanks a lot! -- View this message in context: http://n4.nabble.com/Count-matches-of-a-sequence-in-a-vector-tp2019018p2019018.html