Hello -- I am trying to create a dataframe whose rows are the cross product of rows in two other dataframes. Here's an example:
A = data.frame(F1=c('1','2','3','2')) B = data.frame(F2=c('4','5')) C = data.frame() for (x in unique(A[,'F1'])) { C = rbind(C, cbind(F1=x,B)) } How can I achieve this without the for loop? Thanks. ______________________________________________ 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.