seqlength-align: Align sequence length across domains

seqlength.alignR Documentation

Align sequence length across domains

Description

Sets lengths of sequences of multiple domains as the shortest lengths across domains.

Usage

 seqlength.align(seq.list)

Arguments

seq.list

list of sequence objects (of class stslist) created with the seqdef function. The sequence objects must all have the same number of sequences.

Details

Sequences in the sequence objects are assumed to be ordered conformably. The length of the i-th sequence in each domain is set as the length of the shortest i-th sequence of the domains. The reduction of length is done by filling end positions with voids.

Author(s)

Gilbert Ritschard

See Also

seqlength

Examples

## Using the ex1 data set with sequences of different length
data(ex1)
s1 <- seqdef(ex1[,1:13])
seqlength(s1)

## sequence object s2 with a shorter 1st sequence

s2 <- s1
s2[1,8:13] <- attr(s2,"void")
seqlength(s2)

## aligning sequence lengths
seqlength.align(list(s1,s2))


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