Re: [R] R WRONG CALCULATIONS - Please Help

2015-09-14 Thread Frank Schwidom
On Mon, Sep 14, 2015 at 04:11:57PM +0100, JORGE COLACO wrote: > > X-mean > [,1] [,2] [,3] [,4] [,5] [,6] > [1,] -0.8 -0.2 0.8 -1.2 0.8 -0.2 > [2,] -0.2 0.2 0.8 0.8 0.8 -1.2 > [3,] -1.2 -0.2 -0.8 0.8 -0.2 0.8 > [4,] 0.8 0.8 -1.2 -0.8 -0.2 -0.2 > [5,] -0.2 -0.2 0.8 0.8 -0.8 0.8 > >

Re: [R] R WRONG CALCULATIONS - Please Help

2015-09-14 Thread Nordlund, Dan (DSHS/RDA)
help-boun...@r-project.org] On Behalf Of Sarah Goslee Sent: Monday, September 14, 2015 10:07 AM To: JORGE COLACO Cc: r-help Subject: Re: [R] R WRONG CALCULATIONS - Please Help On Mon, Sep 14, 2015 at 11:11 AM, JORGE COLACO wrote: > I would greatly appreciate if you could let me know why the R d

Re: [R] R WRONG CALCULATIONS - Please Help

2015-09-14 Thread Rui Barradas
Hello, R subtracts the _column_ vector 'mean' to X (column by column). Apparently you want the transpose, or think 'mean' is a row vector. Try instead t(t(X) - mean) And use another name for 'mean', it already is the name of a function. Hope it helps, Rui Barradas Em 14-09-2015 16:11, JORG

Re: [R] R WRONG CALCULATIONS - Please Help

2015-09-14 Thread Sarah Goslee
On Mon, Sep 14, 2015 at 11:11 AM, JORGE COLACO wrote: > I would greatly appreciate if you could let me know why the R does not make > the right computations in the case below. > Waiting for your reply > Jorge Colaço R made the correct computations: it did exactly what you told it. It isn't R's fa

[R] R WRONG CALCULATIONS - Please Help

2015-09-14 Thread JORGE COLACO
I would greatly appreciate if you could let me know why the R does not make the right computations in the case below. Waiting for your reply Jorge Colaço R version 3.2.2 (2015-08-14) -- "Fire Safety" Copyright (C) 2015 The R Foundation for Statistical Computing Platform: i386-w64-mingw32/i386