seqfpos: Search for the first occurrence of a given element in a...

Description Usage Arguments Details Author(s) Examples

View source: R/seqfpos.R

Description

Returns a vector containing the position of the first occurrence of the given element in each of the sequences in the data set.

Usage

1
 seqfpos(seqdata, state)

Arguments

seqdata

a sequence object (see seqdef function).

state

the state element to search in the sequences

Details

the state to search for has to be passed as a character string, and must be one of the state returned by the alphabet function. If the state is not contained in a sequence, NA is returned for this sequence.

Author(s)

Alexis Gabadinho

Examples

1
2
3
4
5
6
data(biofam)
biofam.seq <- seqdef(biofam,10:25)

## Searching for the first occurrence of state 1
## in the biofam data set.
seqfpos(biofam.seq,"1")


TraMineR documentation built on May 21, 2017, 12:47 a.m.
Search within the TraMineR package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.