interactionCustom {inTextSummaryTable} | R Documentation |
Compute the interaction between variable(s),
without propagating the missing values (if present in one of the variable)
unlike the behaviour with interaction
.
This also ensure that the levels of the final interaction variables
are ordered similarly as the levels of the input var
(if present).
Description
Compute the interaction between variable(s),
without propagating the missing values (if present in one of the variable)
unlike the behaviour with interaction
.
This also ensure that the levels of the final interaction variables
are ordered similarly as the levels of the input var
(if present).
Usage
interactionCustom(data, var, varDataLevels = NULL)
Arguments
data |
Data.frame with data. |
var |
Character vector with variable(s) to consider. |
varDataLevels |
(optional) Data.frame with data to consider to define the levels of the variable. If not specified, only the combinations of variable(s) available in the data are retained. |
Value
list with:
'x': factor with interaction between the input
var
'dataLevels': data.frame with mapping between the
var
variable(s) and the new factor levels
Author(s)
Laure Cougnaud
[Package inTextSummaryTable version 3.3.3 Index]