View source: R/miscellaneous.R
interactionCustom | R Documentation |
interaction
.
This also ensure that the levels of the final interaction variables
are ordered similarly as the levels of the input var
(if present).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).
interactionCustom(data, var, varDataLevels = NULL)
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. |
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
Laure Cougnaud
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.