Hi, On Wednesday, November 2, 2011, flokke <[email protected]> wrote: > Dear all, > I hope you can forgive me my stupid questions, but I am a very new R user (; > > So, this is my question: > > I have two matrices, > those are: > > matrix1 <- matrix(cbind(vector1, vector2), 1,2, dimnames = list(c("values"), > c("T value", > "p value"))) > > matrix2 <- matrix(dcbind,2,6,dimnames = list(c("x", "y"), > c("Min", "1st qu.", "Median", "Mean", "3rd > qu.", "Max"))) > > Now, I would like to merge them, but I want to receive the following result: > > Min 1st qu. Median Mean 3rd qu. Max > x 3 3 4 4 4 4 > y 3 3 3 3 3 3 > > t value p value > value 3 3 > > so both vectors should stand above each other... > when I use merge() I dont get this result, also not with cbind or rbind. > I neither can make a a data frame of the two matrices. > I think that I should use the function array with dim(6,2,2), but I dont > know how that is exactly working > (I couldn make it working)
What are you trying to do, really? You have a matrix with one row and two columns, and a matrix with two rows and six columns. Those just don't fit together. If you're. trying to work wit them in a different form, you'll. need to give more detail. If you're just trying to display them, then print them sequentially. Otherwise, I'm perplexed. Sarah > I would be very glad if you could let me know how to solve this problem. > > Cheers, > maria > > View this message in context: http://r.789695.n4.nabble.com/problem-with-merging-two-matrices-tp3983136p3983136.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > [email protected] 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. > -- Sarah Goslee http://www.stringpage.com http://www.sarahgoslee.com http://www.functionaldiversity.org [[alternative HTML version deleted]] ______________________________________________ [email protected] 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.

