seqecontain {TraMineR}R Documentation

Check if sequence contains events

Description

Check if a sequence or a subsequence contains given events

Usage

seqecontain(seq, eventList, exclude = FALSE)

Arguments

seq A event sequence object (seqelist) or a an event subsequence object (subseqelist)
eventList A list of events
exclude if TRUE the search is exclusive and returns FALSE for any subsequence containing an event that is not in eventList

Details

Checks, for each provided event sequence, if it contains one of the events in eventList. If exclude is TRUE, seqecontain looks if all events of the subsequence are in eventList.

Value

A logical vector.

See Also

seqecreate for creating event sequence objects and seqefsub for creating event subsequence objects.

Examples

data(actcal.tse)
actcal.seqe <- seqecreate(actcal.tse)

##Searching for frequent subsequences, that is appearing at least 20 times
fsubseq <- seqefsub(actcal.seqe,minSupport=20)

##looking for subsequence with FullTime
seqecontain(fsubseq,c("FullTime"))


[Package TraMineR version 1.2-1 Index]