Hello all, I have 4 matrices with 3 columns each (different number of rows though). I want to find a function that returns all possible 3-place vectors corresponding to the sum by columns of picking one row from matrix 1, one from matrix 2, one from matrix 3, and one from matrix 4. So basically, all possible ways of picking one row from each matrix and then sum their columns to obtain a 3-place vector. Is there a way to use expand.grid and reduce to obtain this result? Or am I on the wrong track? Thank you, Bruno PS:I believe I have given all relevant info. I apologize in advance if my question is ill-posed or ambiguous.
______________________________________________ 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.