renumerate.Rd
denumerate
converts a formula written using the conventions of
loglm
into one that terms
is able to process. renumerate
converts it back again to a form like the original.
renumerate(x)
x | A formula, normally as modified by |
---|
A formula where all variables with names of the form .vn
, where
n
is an integer, converted to numbers, n
, as allowed by the
formula conventions of loglm
.
This is an inverse function to denumerate
. It is only needed
since terms
returns an expanded form of the original formula
where the non-marginal terms are exposed. This expanded form is
mapped back into a form corresponding to the one that the user
originally supplied.
#> ~(.v1 + .v2 + .v3)^3 + a/b #> <environment: 0xc618b88>## ~ (.v1 + .v2 + .v3)^3 + a/b renumerate(.Last.value)#> Error in UseMethod("renumerate"): no applicable method for 'renumerate' applied to an object of class "logical"## ~ (1 + 2 + 3)^3 + a/b