seqfposend: End of first spell in given state

View source: R/seqfposend.R

seqfposendR Documentation

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)

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.

Value

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

Author(s)

Gilbert Ritschard

See Also

seqfpos

Examples

## 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")


TraMineR documentation built on Dec. 8, 2024, 3:01 p.m.