o:[EMAIL PROTECTED]
> Sent: Tuesday, January 23, 2007 8:00 PM
> To: Shubha Vishwanath Karanth
> Cc: r-help@stat.math.ethz.ch
> Subject: Re: [R] Vector to Matrix transformation
>
> Shubha Vishwanath Karanth wrote:
> > Hi R,
> >
> > I have a vector V1 of unknown len
How to suppress the recycling of items in a matrix..instead NA can be
filled.
-Original Message-
From: Chuck Cleland [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 23, 2007 8:00 PM
To: Shubha Vishwanath Karanth
Cc: r-help@stat.math.ethz.ch
Subject: Re: [R] Vector to Matrix
Shubha Vishwanath Karanth wrote:
> Hi R,
>
> I have a vector V1 of unknown length, say n. I need to convert this into
> a matrix C of row size=5, and accordingly the column should be updated.
> I tried with:
>
> C=as.matrix(V1,5,n/5)
>
> But it is not working...Could somebody help me on this?
3:10 PM
Subject: [R] Vector to Matrix transformation
> Hi R,
>
>
>
> I have a vector V1 of unknown length, say n. I need to convert this
> into
> a matrix C of row size=5, and accordingly the column should be
> updated.
> I tried with:
>
>
>
> C=as.matrix(V
Shubha Vishwanath Karanth wrote:
> Hi R,
>
>
>
> I have a vector V1 of unknown length, say n. I need to convert this into
> a matrix C of row size=5, and accordingly the column should be updated.
> I tried with:
>
>
>
> C=as.matrix(V1,5,n/5)
>
>
>
> But it is not working...Could somebody help
Hi R,
I have a vector V1 of unknown length, say n. I need to convert this into
a matrix C of row size=5, and accordingly the column should be updated.
I tried with:
C=as.matrix(V1,5,n/5)
But it is not working...Could somebody help me on this?
Thanks in advance...
[[alte
vector formed by stringing out
the columns one after another. as.vector is similar.
Date: Fri, 3 Dec 2004 11:39:57 +0100
From: Gwenael Jacob <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Subject: [R] vector to matrix transformation
Dear,
Some analysis (linear regression) can o
(*, "call")= language dist(x = x)
R > class(y)
[1] "dist"
R > class(x)
[1] "numeric"
R >
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Gwenael Jacob
> Sent: Friday, December 03, 2004 5:40 AM
>
On 3 Dec 2004 at 11:39, Gwenael Jacob wrote:
> Dear,
>
> Some analysis (linear regression) can only be
> done from a vectorized dataset whereas others
> require a matrix (Mantel tests). I use the two
> analyses and thus need to format my data in
> matrix and vector. I spent some time trying
On Dec 3, 2004, at 5:39 AM, Gwenael Jacob wrote:
Dear,
Some analysis (linear regression) can only be done from a vectorized
dataset whereas others require a matrix (Mantel tests). I use the two
analyses and thus need to format my data in matrix and vector. I spent
some time trying to solve the p
Hi,
did you see:
as.data.frame()
as.matrix()
as.vector()
matrix()
> x
a b c
1 1 2 3
2 1 2 3
3 2 3 4
4 3 4 5
> is.data.frame(x)
[1] TRUE
> as.matrix(x)
a b c
1 1 2 3
2 1 2 3
3 2 3 4
4 3 4 5
> y<-as.matrix(x)
> is.matrix(y)
[1] TRUE
> as.vector(y)
[1] 1 1 2 3 2 2 3 4 3 3 4 5
> z<-as.vector(y)
Dear,
Some analysis (linear regression) can only be
done from a vectorized dataset whereas others
require a matrix (Mantel tests). I use the two
analyses and thus need to format my data in
matrix and vector. I spent some time trying to
solve the problem and I just gave up. Did anyone
knows ho
12 matches
Mail list logo