Try this: merge(B, A)
On 13/11/2007, sun <[EMAIL PROTECTED]> wrote: > 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 > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > -- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40" S 49° 16' 22" O ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.