seqfplot {TraMineR} | R Documentation |
Graphic presenting the frequency of sequences
Description
The sequences are presented as stacks of successive states, ordered by their relative frequency in the dataset.
Usage
seqfplot(seqdata, group=NULL, title=NULL, tlim=NULL, pbarw=FALSE, ...)
Arguments
seqdata |
a sequence object created with the seqdef function. |
group |
Plots one plot for each level of the factor given as argument. |
title |
title for the graphic. Default to NULL. |
tlim |
if tlim>0, shows only the 'tlim' most frequent sequences. If tlim=NULL (default), the 10 most frequent sequences are displayed. |
pbarw |
if pbarw=TRUE, the width of the bars are proportional to the sequence frequency in the dataset. Default to FALSE. |
... |
arguments to be passed to the plot.stslist function or other graphical parameters. Use axes for controling the display of axes, withlegend for controling the display of a legend for the plot, etc... |
See Also
plot.stslist, seqtab
.
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.lab <- c("Parent", "Left", "Married", "Left+Marr",
"Child", "Left+Child", "Left+Marr+Child", "Divorced")
biofam.seq <- seqdef(biofam, 10:25, labels=biofam.lab)
## Plot of the 10 most frequent sequences
## with equal bar width
seqfplot(biofam.seq)
## The same plot with
## proportional bar width
## grouped by sex
seqfplot(biofam.seq, group=biofam$sex, pbarw=TRUE)
## The same plot without legend,
## axes and labels
seqfplot(biofam.seq, group=biofam$sex, pbarw=TRUE,
axes=FALSE, ylab=NA, withlegend=FALSE)
[Package
TraMineR version 1.2-1
Index]