formula: Extract the formula from a pim or pim.formula object
Description
This function allows you to extract a formula from a pim
or a pim.formula object. In the latter case, you extract
the original formula.
Usage
formula(x, ...)
# S4 method for pim
formula(x, orig = FALSE, ...)
# S4 method for pim.formula
formula(x, ...)
Arguments
x
a pim or pim.formula object
...
arguments passed to other methods
orig
a locigal value indicating whether the original formula
(TRUE) or the pim.formula object (FALSE) should
be returned. Defaults to FALSE
Value
a pim.formula if x is a pim
object and orig = TRUE. Otherwise a formula object.
Details
This function is based on formula from the stats
package. It creates a generic and can hence be used more or less in the
same way. Yet, as the pim package is dependent on the correct
binding between the formula objects and different environments, it is
advised not to change the environments tied to the formulas and to
use this function only to extract the desired information.