latticeParseFormula         package:lattice         R Documentation

Parse Trellis formula

Description:

     this function is used by high level Lattice functions like
     'xyplot' to parse the formula argument and evaluate various
     components of the data. Might be useful by itself. 'y' and
     'g_1,...,g_n' may be missing.

Usage:

     latticeParseFormula(model, data, dimension = 2,
                         subset = TRUE, groups = NULL,
                         multiple, outer,
                         subscripts,
                         drop)

Arguments:

   model: the model/formula to be parsed.  This can be in either of two
          possible forms, one for 2d and one for 3d formulas,
          determined by the 'dimension' argument. The 2d formulas are
          of the form 'y~x|g_1*...*g_n', and the 3d formulas are of the
          form 'z~x*y|g_1*...*g_n'. In the first form, 'y' may be
          omitted. The conditioning variables 'g_1, ...,g_n' can be
          omitted in either case. 

    data: the environment/dataset where the variables in the  formula
          are evaluated. By default, the environment where the function
          was called from. 

dimension: dimension of the model, see above

  subset: index for choosing a subset of the data frame 

  groups: the grouping variable, if present

multiple, outer: logicals, determining how a `+' in the y and x
          components of the formula are processed. See 'xyplot' for
          details 

subscripts: logical, whether subscripts are to be calculated 

    drop: logical or list, similar to the 'drop.unused.levels' argument
          in 'xyplot', indicating whether unused levels of conditioning
          factors and data variables that are factors are to be
          dropped. 

Value:

     returns a list with several components, including 'left, right,
     left.name, right.name, condition' for 2-D, and 'left, right.x,
     right.y, left.name, right.x.name, right.y.name, condition' for
     3-D. Other possible components are groups, subscr

Author(s):

     Saikat DebRoy, Deepayan Sarkar deepayan@stat.wisc.edu

See Also:

     'xyplot', 'Lattice'

