strucParseFormula {stripless}R Documentation

Parse Trellis Formula for strucplot

Description

This is a wrapper for latticeParseFormula that allows the option of using a "." for the conditioning variables (i.e. after "|") instead of explicitly writing them out. When so used, it means "all variables in the data argument except those already used to the left of the |". See the Help for strucplot for examples.

Usage

strucParseFormula(form, data = list())

Arguments

form

The strucplot formula to be parsed.

data

An optional data frame containing values for any variables in the formula. Default = list(), which means that all variables will be looked up in the formula's environment.

Details

Note that this is a convenience option only; the conditioning can always be explicitly given. Also note that the two options cannot be combined: either a "." and only a "." must be used or all the conditioning variables must be written out.

Value

Same as latticeParseFormula with an additional "form" attribute that is the formula used with all conditioning explicitly given.

See Also

latticeParseFormula xyplot

Examples

 exdat <- data.frame(x = 1:5, alongname = sample( letters[1:3],5, rep=TRUE),
   butalongername = sample(LETTERS[1:2],5, rep = TRUE))
   y <- runif(5)

 strucParseFormula (y ~ x| alongname*butalongername, data = exdat)

 # The same
 strucParseFormula (y ~ x|., data = exdat)

 # The 'data' argument is required with '.'
 ## Not run: 
 strucParseFormula (y ~ x|.)
 
## End(Not run)


[Package stripless version 1.0-3 Index]