A Trellis plot of the response versus the primary covariate is
  generated. If outer variables are specified, the combination of their
  levels are used to determine the panels of the Trellis
  display. Otherwise, the levels of the grouping variable determine the
  panels. A scatter plot of the response versus the primary covariate is
  displayed in each panel, with observations corresponding to same
  inner group joined by line segments. The Trellis function
  xyplot is used.
# S3 method for nfnGroupedData
plot(x, outer, inner, innerGroups, xlab, ylab, strip, aspect, panel,
     key, grid, …)an object inheriting from class nfnGroupedData,
   representing a groupedData object with a numeric primary
   covariate and a single grouping level.
an optional logical value or one-sided formula,
   indicating covariates that are outer to the grouping factor, which
   are used to determine the panels of the Trellis plot. If
   equal to TRUE, attr(object, "outer") is used to
   indicate the outer covariates. An outer covariate is invariant within
   the sets of rows defined by the grouping factor.  Ordering of the
   groups is done in such a way as to preserve adjacency of groups with
   the same value of the outer variables. Defaults to NULL,
   meaning that no outer covariates are to be used.
an optional logical value or one-sided formula, indicating
   a covariate that is inner to the grouping factor, which is used to
   associate points within each panel of the Trellis plot. If
   equal to TRUE, attr(object, "inner") is used to
   indicate the inner covariate. An inner covariate can change within
   the sets of rows defined by the grouping  factor. Defaults to
   NULL, meaning that no inner covariate  is present.
an optional one-sided formula specifying a factor
   to be used for grouping the levels of the inner
   covariate. Different colors, or line types, are used for each level
   of the innerGroups factor. Default is NULL, meaning
   that no innerGroups covariate is present.
optional character strings with the labels for the
   plot. Default is the corresponding elements of attr(object,
     "labels") and attr(object, "units") pasted together.
an optional function passed as the strip argument to
   the xyplot function. Default is strip.default(…, style
     = 1) (see trellis.args).
an optional character string indicating the aspect ratio
   for the plot passed as the aspect argument to the
   xyplot function. Default is "xy" (see
   trellis.args).
an optional function used to generate the individual
   panels in the Trellis display, passed as the panel argument
   to the xyplot function.
an optional logical function or function. If TRUE
   and innerGroups is non-NULL, a legend for the
   different innerGroups levels is included at the top of the
   plot. If given as a function, it is passed as the key argument
   to the xyplot function.  Default is TRUE if
   innerGroups is non-NULL and FALSE otherwise.
an optional logical value indicating whether a grid should
   be added to plot. Default is TRUE.
optional arguments passed to the xyplot function.
a Trellis plot of the response versus the primary covariate.
Bates, D.M. and Pinheiro, J.C. (1997), "Software Design for Longitudinal Data", in "Modelling Longitudinal and Spatially Correlated Data: Methods, Applications and Future Directions", T.G. Gregoire (ed.), Springer-Verlag, New York.
# NOT RUN {
# different panels per Subject
plot(Orthodont)
# different panels per gender
plot(Orthodont, outer = TRUE)
# }
Run the code above in your browser using DataLab