Macaulay2 » Documentation
Packages » RInterface » RObject » RObject ~ RObject
next | previous | forward | backward | up | index | toc

RObject ~ RObject -- create a two-sided R formula

Description

Create a two-sided R formula using R's ~ operator. Formulas are used throughout R's statistical modeling functions to specify relationships between variables.

i1 : RQuote mpg ~ RQuote wt

o1 = .Primitive("~")(mpg, wt)

o1 : RObject of type language

To create a one-sided formula (right-hand side only), use the unary form; see ~ RObject.

See also

Ways to use this method:


The source of this document is in /build/reproducible-path/macaulay2-1.26.05+ds/M2/Macaulay2/packages/RInterface/doc/formulas.m2:28:0.