search for: gregsmisc

Displaying 1 result from an estimated 1 matches for "gregsmisc".

Did you mean: gregmisc
2005 Mar 20
2
Generating Interaction Factors (combinations of Data Frame columns)
...esigns. One of the things I'd like to do is generate all possible interaction effects, given the main effects. I've been searching through the documentation, packages and mail list archives, but the closest I can find are combin() in package combinat and combine() and combinations() in gregsmisc, none of which actually produces the results I want. Given a data frame with columns labeled A, B, C and D, I would like to generate a data frame with columns that are the combination of each of the columns in the original data frame. The output columns would be A*B, A*C, A*D, A*E, A*B*C, A*B*D...