Learn R Programming

stripless (version 1.0-1)

defaultStrucLegend: Construct default structure legend to plot on a strucplot display.

Description

A structure legend is always printed on the console. It can also be optionally added to the trellis plot. This non-exported function constructs a default legend for this option.

Usage

defaultStrucLegend(struc, legendLoc = c("top", "right", "bottom", "left", "newpage"), lbl = "PLOT STRUCTURE", heading = c("Horizontal", "Vertical"), miss = "None", cex.font = 1, cex.lbl = 1.25, col = "black", abbrevLength = 0, ...)
displayStruc(struc, miss = "No Conditioning", heading = c("Horizontal", "Vertical"), abbrevLength = 0)

Arguments

struc
The "structure" attribute of a strucplot object
legendLoc
One of c("top","right","bottom","left","newpage") The first 4 specify on which side of the trellis display to place the legend. The last indicates that the legend will be plotted at the center of a separate page.
lbl
A character string title for the legend. Default = "PLOT STRUCTURE"
heading
A character vector of length 2 giving the headings for the horizontal and vertical conditioning variables portions of the legend. Default = c("Horizontal", "Vertical")
miss
A character string to use when a conditioning variable is absent. Default = "None"
cex.font
Multiplier for text font size. Default = 1
cex.lbl
Multiplier for label font size. Default = 1.25
col
Text color for text. Default = "black"
abbrevLength
minlength argument for abbreviate function to abbreviate names of the conditioning factors. Default = 0 = no abbreviation.
...
Additional arguments to be used in a gp list for controlling text appearance. See gpar for possibilities.

Value

A text grob that can be included as part of the strucplot trellis plot.

Functions

  • displayStruc: An auxiliary function that constructs the character strings for the conditioning variables.

See Also

print.structured