Learn R Programming

plgraphics (version 1.2)

deparseCond: Analyze formula with conditional variables

Description

Check if formula is valid and, if it contains a | character, idenitfy regressors and conditional variables

Usage

deparseCond(formula)

Value

Returns the formula with the following attributes:

y

"vertical" (response) variable(s)

x

"horizontal" (regressor) variable(s)

a

(first) conditional variable, if any

b

second conditional variable, if any

Arguments

formula

A model formula, possibly containing a | character that introduces terms describing conditions

Author

Werner A. Stahel

Examples

Run this code
  deparseCond(yy ~ xx)
  deparseCond(yy ~ xx | aa + bb)
  deparseCond(y1 + y2 ~ x1 + log(x2) | sqrt(quantity))

  plyx(Sepal.Width~Sepal.Length | Species, data=iris)

Run the code above in your browser using DataLab