ali_protocol
2012-Feb-27 07:57 UTC
[R] What is the fastest way to combine all columns of a matrix to one column?
Dear all, Newbie: What is the fastest way to combine all columns of a matrix to one column? -- View this message in context: http://r.789695.n4.nabble.com/What-is-the-fastest-way-to-combine-all-columns-of-a-matrix-to-one-column-tp4423882p4423882.html Sent from the R help mailing list archive at Nabble.com.
Petr PIKAL
2012-Feb-27 09:12 UTC
[R] What is the fastest way to combine all columns of a matrix to one column?
Hi> > Dear all, > > Newbie: What is the fastest way to combine all columns of a matrix toone> column?If mm is your matrix use dim(mm) <-NULL Regards Petr> > -- > View this message in context: http://r.789695.n4.nabble.com/What-is-the- >fastest-way-to-combine-all-columns-of-a-matrix-to-one-column-tp4423882p4423882.html> Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html> and provide commented, minimal, self-contained, reproducible code.
Petr PIKAL
2012-Feb-27 10:54 UTC
[R] What is the fastest way to combine all columns of a matrix to one column?
Hi> Hi, > > Thank you. I actually wanted to reserve the rows, I dont know how to > do this with > dim(mm) <-NULLI do not understand. What does it mean reserve rows. Matrix is a vector with dimension so you can change dimensions freely with dim(mm) <- any suitable combination dim(mm) <-NULL gives you plain vector dim(mm) <- c(rows, columns) gives you now matrix with specified number of rows and columns. You can put columns to 1 and in that case you will get one column matrix. Please provide some toy example what do you really want. Regards Petr> > thanks again > > > On 2/27/12, Petr PIKAL <petr.pikal at precheza.cz> wrote: > > Hi > >> > >> Dear all, > >> > >> Newbie: What is the fastest way to combine all columns of a matrix to > > one > >> column? > > > > If mm is your matrix use > > > > dim(mm) <-NULL > > > > Regards > > Petr > > > > > >> > >> -- > >> View this message in context:http://r.789695.n4.nabble.com/What-is-the-> >> > > fastest-way-to-combine-all-columns-of-a-matrix-to-one-column- > tp4423882p4423882.html > >> Sent from the R help mailing list archive at Nabble.com. > >> > >> ______________________________________________ > >> R-help at 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. > > > >
Rolf Turner
2012-Feb-27 21:42 UTC
[R] What is the fastest way to combine all columns of a matrix to one column?
On 27/02/12 20:57, ali_protocol wrote:> Dear all, > > Newbie: What is the fastest way to combine all columns of a matrix to one > column?What (on earth!) do you mean by ``combine''? *You* understand what you mean; I doubt that anyone else does. For Pete's sake, if you are going to ask a question, make it clear what the <expletive deleted> you are asking! A self-contained reproducible example always helps. cheers, Rolf Turner
Apparently Analagous Threads
- Fastest way to merge matrix columns into a comma delimited string?
- fastest way to multiply each column of a matrix by a single vlaue
- Fastest way to compare a single value with all values in one column of a data frame
- Bioconductor. MA plot for qPCR array
- Fastest way to find the last index k such that x[k] < y in a sorted vector x?