plot.seqrf: Plot method for seqrf objects of relative frequency groups of...

View source: R/plot.seqrf.R

plot.seqrfR Documentation

Plot method for seqrf objects of relative frequency groups of sequences.

Description

Plots the medoids of the RF groups of sequences and/or the boxplots of the distribution of the distances from the sequences to their group medoid.

Usage

## S3 method for class 'seqrf'
plot(x,
        space=0,
        border=NA,
        which.plot="medoids",
        ylab=NA,
        main=NULL,
        frame.plot=FALSE,
        info="all",
        skipar=FALSE,
        ...)

Arguments

x

a seqrf object

space

space between horizontal bars representing medoid sequences (see barplot)

border

the color to be used for the border of the bars. Use border = NA to omit borders. (see barplot)

which.plot

string. One of "both", "medoids", "diss.to.med". When "medoids", only the index plot of the medoids is displayed, when "diss.to.med", the grouped boxplots of the distances to the medoids is displayed, and when "both" a combined plot of the two plots is displayed.

ylab

string. An optional label for the y-axis. If set as NA (default), no label is drawn.

main

main graphic title. Default is NULL.

frame.plot

logical. Should a frame be plotted around the grouped boxplots?

info

string. One of "all" (default), "subtitle", "stat", and "none".

skipar

logical. Should plot skip internal par and layout commands. May be necessary to combine "medoids" or "diss.to.med" plots with layout or par(mfrow=...)

...

additional arguments passed to plot.stslist

Details

The plot of the medoids is generated with the plot method for stslist objects and the boxplots with a slightly adapted version of the boxplot function for weighted data (wtd.boxplot) of the ENmisc package by Erich Neuwirth.

When which.plot="both", layout is used to produce the combined plot. Therefore, the resulting combined plot cannot be nested into other combinations using either par(mfrow=...) or layout. To combine with other plots, you must produce separately the plot of the medoids and the grouped boxplots using successively which.plot="medoids" and which.plot="diss.to.med".

When arguments xaxis and yaxis are on the ... list to be passed to plot.stslist, they are also used to control the display of the x and y axis of the boxplot.

With info="stat" or "all", the pseudo R2 and F statistics are displayed under the plot, but only when which.plot = "both".

Author(s)

Gilbert Ritschard.

See Also

seqrf, seqrfplot


TraMineR documentation built on Sept. 19, 2023, 1:07 a.m.