[R] combine two dataframe

sun flyhyena at yahoo.com.cn
Tue Nov 13 12:49:48 CET 2007


I have two data frame A and B adn want to cross them.
A has format as: 

a1  a2 a3
1   2    3
2   3    1
1   3    2
...

B:

b1 b2
1   2 
2   1
...

the combine result shall be something like

a1 a2 a3 b1 b2
1   2   3   1  2
1   2   3   2  1
2   3   1   1  2
2   3   1   2  1
1   3   2   1  2
1   3   2   2  1
....


is there a function able of doing this instead of  loops?

Thanks,
Sun



More information about the R-help mailing list