Description Usage Arguments Value Examples
interact.data
interacts all the data in a data.frame
or matrix
.
1 | interact.data(data, base.cols = NULL, exclude.pair = NULL)
|
data |
a |
base.cols |
indicates columns from one category.
Interactions among variables from a same base.col will be avoided. For example, if three indicator columns,
"ChannelR", "ChannelC" and "ChannelB", are created from a categorical column "Channel", then the interaction among them
can be excluded by assigning |
exclude.pair |
the pairs will be excluded from interactions. This should be a |
This returns an object of matrix
which contains interactions.
1 2 3 4 5 6 7 | df = data.frame(1:3, 4:6, 7:9, 10:12, 13:15);
colnames(df) = c("aa", "bb", "cc", "dd", "aa2");
df
interact.data(df);
interact.data(df, base.cols = "aa");
interact.data(df, base.cols = "aa", exclude.pair = list(c("bb", "cc")));
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.