Description Usage Arguments Value Examples
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.
1 | interact.part(input, first, second)
|
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 |
A data matrix with multiplied columns as indicated using the sets 'first' and 'second'
1 2 3 4 5 | set.seed(1)
somedata <- data.frame(a = rnorm(10), b = rnorm(10), c = runif(10), d = runif(10))
somedata
someinteract <- interact.part(somedata, first = c("a", "b"), second = c("c", "d"))
someinteract
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.