You should read ?var and ?sd more carefully. For a data frame or a matrix,
var() returns the covariance matrix of the columns, whereas sd() returns the
standard deviations of the columns. If you want standard deviations of the
rows, you need to transpose the data.
Andy
> From: Jagarlamudi, Chou
On Wed, 9 Mar 2005 13:49:44 -0600
"Jagarlamudi, Choudary" <[EMAIL PROTECTED]> wrote:
> Hi all,
>
>I am trying to find sd of my rows in a matrix and i get column sd inspite
> of extracting rows.
> I tried to do the sqrt(var(x)) but that did'nt work as well,
>
> Here is my data
>
> genes
Jagarlamudi, Choudary wrote on 3/9/2005 1:49 PM:
Hi all,
I am trying to find sd of my rows in a matrix and i get column sd inspite of extracting rows.
I tried to do the sqrt(var(x)) but that did'nt work as well,
Here is my data
genes
15 24 63 40
25 42 46 35
23 53 37 45
30 37 50 55
40 51 3
On Wed, 9 Mar 2005 13:49:44 -0600, "Jagarlamudi, Choudary"
<[EMAIL PROTECTED]> wrote :
>Hi all,
>
> I am trying to find sd of my rows in a matrix and i get column sd inspite
> of extracting rows.
>I tried to do the sqrt(var(x)) but that did'nt work as well,
>
>Here is my data
>
>genes
>15 24