Sequence length

Share:

Description

Returns the length of sequences.

Usage

1
 seqlength(seqdata)

Arguments

seqdata

a sequence object created with the seqdef function.

Details

The length of a sequence is computed by eliminating the missing values at the end (right) and counting the number of states or events. The seqlength function returns a vector containing the length of each sequence in the sequence object given as argument.

Author(s)

Alexis Gabadinho

Examples

1
2
3
4
5
6
7
8
9
## Loading the 'famform' example data set
data(famform)

## Defining a sequence object with the 'famform' data set
ff.seq <- seqdef(famform)

## Retrieving the length of the first 10 sequences
## in the ff.seq sequence object
seqlength(ff.seq)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.