interact.part: Compute a chosen set of pairwise interactions between two sets of columns in a data matrix
Description
Similar to interact.all-function, but here user provides two sets of variables, and each pairwise combination between these two sets is multiplied. These pairwise interactions are then returned as a new data matrix, with a colon indicating which variables were multiplied.
Usage
interact.part(input, first, second)
Value
A data matrix with multiplied columns as indicated using the sets 'first' and 'second'
Arguments
input
The input data matrix, of either class matrix or data.frame
first
The first set of columns to combine with each of the members of the second set, as either integers or column names
second
The second set of columns to combine with each of the members of the first set, as either integers or column names