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
> >
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
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
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
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
5 matches
Mail list logo