Learn R Programming

TraMineR (version 2.2-10)

seqfposend: End of first spell in given state

Description

Returns the position in the sequences of end of first spell in a given state

Usage

seqfposend(seqdata, state, with.missing=FALSE, lead=0, from.seq.start=TRUE)

Value

Vector of integers giving position of end of spell in the sequences.

Arguments

seqdata

State sequence object of class stslist as produced by seqdef.

state

Element of the alphabet of seqdata.

with.missing

Logical. Should non-void missing values be considered as regular states? See seqdss and seqdur.

lead

Integer. Value to be added to the end position.

from.seq.start

Logical. Should position be computed from the start of the sequence? Default is TRUE. If FALSE, position is computed from the start of the spell.

Author

Gilbert Ritschard

See Also

seqfpos

Examples

Run this code
## End of spell in further education (FE) in first 10 mvad sequences

data(mvad)
m.seq <- seqdef(mvad[1:10,17:86])
seqfposend(m.seq, state="FE")

Run the code above in your browser using DataLab