print.stslist: Print method for state sequence objects

View source: R/stslist-methods.R

print.stslistR Documentation

Print method for state sequence objects

Description

This is the print method for state sequence objects of class stslist created by the seqdef function.

Usage

## S3 method for class 'stslist'
print(x, format='STS', extended=FALSE, ...)

Arguments

x

A state sequence (stslist) object.

format

String: print format. One of "STS" (default) or "SPS".

extended

Logical: should the output be printed in extended matrix form?

...

Additional print arguments.

Author(s)

Gilbert Ritschard

See Also

seqdef, plot.stslist

Examples

## Defining a sequence object with the data in columns 10 to 25
## (family status from age 15 to 30) in the biofam data set
data(biofam)
biofam <- biofam[500:600,] ## using a subsample only
biofam.lab <- c("Parent", "Left", "Married", "Left+Marr",
    "Child", "Left+Child", "Left+Marr+Child", "Divorced")
biofam.shortlab <- c("P","L","M","LM","C","LC","LMC","D")
biofam.seq <- seqdef(biofam, 10:25, states=biofam.shortlab, 
  labels=biofam.lab)

## Print of first 5 sequences
print(biofam.seq[1:5,])
print(biofam.seq[1:5,], extended=TRUE)
print(biofam.seq[1:5,], format="SPS")
print(biofam.seq[1:5,], format="SPS", SPS.out = list(xfix = "", sdsep = "/"))


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