View source: R/Spaghettiogram.R
| spaghettiogram | R Documentation | 
A spaghettiogram is showing repeated measures (longitudinal data)
spaghettiogram(
  formula,
  data,
  xlim,
  ylim,
  xlab = "",
  ylab = "",
  axes = TRUE,
  col,
  lwd,
  lty,
  pch,
  legend = FALSE,
  add = FALSE,
  background = TRUE,
  ...
)
| formula | A formula which specifies the variables for the spaghettiograms. If Y ~ X + id(Z) then for each value of Z the spaghettiogram is the graph (X,Y) in the subset defined by the value of Z. Data are expected to be in the "long" format. Y is a numeric vector and X is a factor whose levels define the X-axis. Each level of the id-vector corresponds to one line (spaghetti) in the plot. | 
| data | data set in which variables X, Y and Z are defined. | 
| xlim | Limits for x-axis | 
| ylim | Limits for y-axis | 
| xlab | Label for x-axis | 
| ylab | Label for x-axis | 
| axes | Logical indicating if axes should be drawn. | 
| col | Colors for the spaghettiograms | 
| lwd | Widths for the spaghettiograms | 
| lty | Type for the spaghettiograms | 
| pch | Point-type for the spaghettiograms | 
| legend | If  | 
| add | If  | 
| background | Control the background color of the graph. | 
| ... | used to transport arguments which are passed to the
following subroutines:  | 
List with data of each subject
data(SpaceT)
Spaghettiogram(HR~Status+id(ID),
               data=SpaceT)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.