createInteractions: Create all possible interactions (product, sum, difference)

Description Usage Arguments

Description

This function takes a data frame as input and returns all possible interaction terms, sums, differences or sums after taking the absolute value of every observation. Normalization before the calculations are carried out is possible. The function does only return the newly created terms, not the input data.

Usage

1
createInteractions(x, type = NULL, normalize = T, excludeFactors = T)

Arguments

x

A data frame with column names

type

"*" for all possible products, "-" for all possible differences, "+" for all possible sums and "absSum" for all possible sums after taking the absolute value of the observations.

normalize

If TRUE, normalize all columns before carrying out any calculations. TRUE by default.

excludeFactors

If TRUE, excludes all factor variables from the calculations. Otherwise, a high number of variables may be created if the data includes a lot of levels. TRUE by default.


Thie1e/convenience documentation built on May 9, 2019, 4:40 p.m.