seq_det: Detect Integer Sequence in Vector

Description Usage Arguments Value Examples

Description

Detect Integer Sequence in Vector

Usage

1
seq_det(vec, seq, type = c("jaap1", "jaap2", "frank"))

Arguments

vec

An integer vector

seq

A sequence of integer values to search in 'vec'

type

Which algorithm to employ?

Value

An integer vector with the indices of the sequence

Examples

1
2
3
4
library(tpfuns)
seq_det(c(1,2,3,5,4,1), c(5,4,1), type = 1)
seq_det(c(1,2,3,5,4,1), c(5,4,1), type = 2)
seq_det(c(1,2,3,5,4,1), c(5,4,1), type = 3)

M-U-UNI-MA/tpfunctions documentation built on May 24, 2019, 7:37 a.m.