I have 2 data.frames with the following columns.
1) A, B, C, D 2) E, F, G, H
What I would like to do is create a new data.frame that has a row for each expand.grid element (1 [, B] 2 [, F]) and will save all other columns and values ββassociated with the col B and col F values ββfrom source data. frames
I am currently doing this using 2 for loops, and this creates a pretty long run time, since the data.frames I'm dealing with are pretty big.
Here is a screenshot of what I'm looking for:
> aa ABCD 1 1 x 3 5 2 2 y 4 6 > bb EFGH 1 7 j 9 11 2 8 k 10 12 > cc ABCDEFGH 1 1 x 3 5 7 j 9 11 2 2 y 4 6 7 j 9 11 3 1 x 3 5 8 k 10 12 4 2 y 4 6 8 k 10 12
Maxym source share