Learn R Programming

formulops (version 0.5.0)

substituting_formula: A substituting formula helps clarify a formula where the parameters are more simply described in separate formulae.

Description

A substituting formula helps clarify a formula where the parameters are more simply described in separate formulae.

Usage

substituting_formula(x, ...)

as_substituting_formula(x, substitutions)

Value

A substituting_formula object which may be coerced into a single formula with an as.formula() method or printed as a list of formulae.

Arguments

x

The base formula

...

Supporting formula of the form x1~x2+x3*x4...

substitutions

A list of supporting formula.

Functions

  • as_substituting_formula: Generate and check substituting_formula

Details

Formula are substituted in order. Substitutions may not have the same left hand side.

Examples

Run this code
foo <- substituting_formula(y~x1+x2, x1~x3*x4, x2~x5/x6+x7)
as.formula(foo)

Run the code above in your browser using DataLab