.BG
.VE $Header: /usr3/s/current/s/.help/RCS/smatrix,v 1.2 83/12/30 19:34:31 rab Exp $
.FN smatrix
.TL
smatrix: Print a Symbolic Matrix for Multivariate Data
.CS
smatrix(x, set, plength, nstrike, spread, scale,
        rowlab, collab, head, na)
.PP
.AG x
matrix of data.  One symbol (possibly overstruck) will be
printed for each element of `x'.  One line of printing is
produced for each row.
.NA
.AG set
optional character string.  The number of characters per
symbol is  given by `nstrike' (below).  If `nstrike==1', the
first character of `set' is the first symbol, etc.  If
`nstrike>1', the first `nstrike' characters of `set' are
overstruck to form the first symbol, the second `nstrike'
characters to form the second symbol, etc.  By default, if
`nstrike==1', the symbols are ".+*".  If `nstrike==2', the
default symbols are ".", "+", "*" and overstruck "$" and
"X".  The equivalent value of `set' would be ". + * $X".
.AG plength
number of lines to print per page (exclusive of running
head).  At the end of each page, a page eject is executed.
The head string (see below) is printed at the top of each
page.  Default page length is 50.
.AG nstrike
number of lines superimposed to make the symbols.  See
the examples under `set' above.  Default 1.
.AG spread
number of blanks (maximum) to put between the columns.
Default 3.
.AG scale
logical, if TRUE, the columns of `x' will be scaled so that
the minimum in each column is 0 and the maximum is 1.  If
FALSE, the assumption is that `x' has been scaled to the
range 0 to 1 by some other procedure. Default TRUE.
.AG rowlab
optional character vector for labelling the rows.  By
default, labels are "1", "2", etc. and only every fifth
label is plotted.  If supplied, the label vector must have
length equal to `nrow(x)'.
.AG collab
optional character vector for labelling the columns.  By
default, labels are "1", "2", etc. and only every fifth
label is plotted.  If supplied, the label vector must have
length equal to `ncol(x)'.
.AG head
optional character string for a running head.  This is
plotted as a title at the top of each page.  By default, the
name of `x' is used.  If there is more than one page, the
page number is included in the title.
.AG na
character to be printed corresponding to
missing values (NAs) in `x'.  Default "N".
.PP
The symbols are chosen by dividing the range 0 to 1 into `ns' equal
intervals, where `ns' is the number of characters in `set', divided by
`nstrike'.
.EX
south <-  state.region==2
smatrix(votes.repub[south,],rowlab=state.name[south],
  collab=encode(votes.year),head="Southern State Votes")
.PI
.KW multivariate
.KW plot*
.KW hplot*
.KW matrix
.KW array*
.WR
