On Mar 13, 2010, at 6:30 PM, Hyo Lee wrote:
Hi guys,
I have a very simple question.
I'm trying to make multiple columns to a single column.
For example,
*ttx1* is a 46*72 matrix.
so, I tried this.
*d1=ttx1[,1]
d2=ttx1[,2]
...
d72=ttx1[,72]*
now, d1, d2, ...,d72 become a 46*1 matrix.
And t
Hi Hyo,
how about as.vector(ttx1) or as.vector(t(ttx1))?
HTH
Stephan
Hyo Lee schrieb:
Hi guys,
I have a very simple question.
I'm trying to make multiple columns to a single column.
For example,
*ttx1* is a 46*72 matrix.
so, I tried this.
*d1=ttx1[,1]
d2=ttx1[,2]
...
d72=ttx1[,72]*
now,
Hey Hyo,
Rbind puts each object in a row, just use c(d1, d2, ... d72) to
combine them all together. If you want it in a matrix
matrix(c(d1,d2,...d72), ncol=1).
Best,
Josh
On Sat, Mar 13, 2010 at 3:30 PM, Hyo Lee wrote:
> Hi guys,
>
> I have a very simple question.
> I'm trying to make multip
Hi guys,
I have a very simple question.
I'm trying to make multiple columns to a single column.
For example,
*ttx1* is a 46*72 matrix.
so, I tried this.
*d1=ttx1[,1]
d2=ttx1[,2]
...
d72=ttx1[,72]*
now, d1, d2, ...,d72 become a 46*1 matrix.
And then.. I tried..
*dd=rbind(d1, d2, ..., d72)*
I
4 matches
Mail list logo