Extend0fromModelMatrixInput()
is a specialized function that extends the input data based on the provided parameters.
It is designed specifically to work with input to ModelMatrix()
.
Extend0fromModelMatrixInput(
data,
freqName,
hierarchies,
formula,
dimVar,
extend0,
dVar = NULL,
avoidHierarchical = FALSE,
hierarchical_extend0 = !avoidHierarchical & is.null(hierarchies),
...
)IsExtend0(extend0)
Extended data frame
Input data frame
Name of (existing) frequency variable
List of hierarchies, which can be converted by AutoHierarchies
.
Thus, the variables can also be coded by "rowFactor"
or ""
, which correspond to using the categories in the data.
A model formula
The main dimensional variables and additional aggregating variables. This parameter can be useful when hierarchies and formula are unspecified.
When extend0
is set to TRUE
, the data is automatically extended.
Additionally, extend0
can be specified as a list, representing the varGroups
parameter
in the Extend0
function.
Can also be set to "all"
which means that input codes in hierarchies
are considered in addition to those in data.
Optional. Specifies the dimVar
input for Extend0()
.
If not provided, dimVar
is calculated by the NamesFromModelMatrixInput()
function.
Parameter passed to Formula2ModelMatrix()
via ModelMatrix()
.
The default value (FALSE
) is the same as in the receiving function.
Specifies the hierarchical
input to Extend0()
.
By default, it is set to the opposite of avoidHierarchical
when hierarchies
is not provided.
If hierarchies
is provided, hierarchical_extend0
is by default set to FALSE
.
This parameter allows the hierarchical
input to Extend0()
to be specified manually,
independent of the input provided to ModelMatrix()
.
Further arguments to underlying functions.
Extend0fromModelMatrixInput()
: The main function that processes and extends input data according to the specified parameters.
IsExtend0()
: A helper function that evaluates the extend0
parameter and returns TRUE
or FALSE
, indicating whether the data should be extended.
Extend0()