He's saying it looks like you need to transpose your matrix with the t() function -- documentation can be attained by typing ?t at the console -- and that you'll need to subset to get the rows you want. It's not quite clear to us which order your rows are actually in because you sent HTML email which got eaten by the server, but t() should get you started.
Michael On Mon, Apr 16, 2012 at 6:08 PM, Soheila Khodakarim <lkhodaka...@gmail.com> wrote: > Hi David, > Thanks a lot for your help. > But unfortunately I can not understand your mean:( > Could you explain more for me? > Best Wishes, > Soheila > > > > > > > > > > > > > On Tue, Apr 17, 2012 at 1:55 AM, David Winsemius > <dwinsem...@comcast.net>wrote: > >> >> On Apr 16, 2012, at 5:19 PM, Soheila Khodakarim wrote: >> >> Dear All >>> >>> I want to arrange our output in 3 columns in R. >>> Example: >>> >>> N 04320 03010 00514 00604 00563 03430 >>> 03022 >>> V 22.000000 0.000000e+00 15.0000000 15.0000 13.0000 1.300000e+01 >>> 51.0000000 >>> p 0.640625 2.910383e-11 0.4257812 0.4375 0.6875 3.356934e-04 >>> 0.2434998 >>> >>> N 03060 04140 03050 00562 00565 >>> V 20.0000000 62.00000000 273.0000000 265.000000 27.0000000 >>> p 0.2783203 0.07714844 0.1044959 0.163799 0.6523438 >>> >>> arranged: >>> >>> N P V >>> 04320 22.000000 0.640625 >>> 03010 0.000000e+00 2.910383e-11 >>> >>> Is there any way to do it in R directly? >>> >> >> ?t >> >> (Type the above two character at your console.) >> >> You may also need object[ , c(1,3,2)] >> >> >> >>> Best Regards, >>> Soheila >>> >>> [[alternative HTML version deleted]] >>> >>> ______________________________**________________ >>> R-help@r-project.org mailing list >>> https://stat.ethz.ch/mailman/**listinfo/r-help<https://stat.ethz.ch/mailman/listinfo/r-help> >>> PLEASE do read the posting guide http://www.R-project.org/** >>> posting-guide.html <http://www.R-project.org/posting-guide.html> >>> and provide commented, minimal, self-contained, reproducible code. >>> >> >> David Winsemius, MD >> West Hartford, CT >> >> > > [[alternative HTML version deleted]] > > ______________________________________________ > 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. ______________________________________________ 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.