Function scale (PR#2209)

lucas@toulouse.inra.fr lucas@toulouse.inra.fr
Thu, 24 Oct 2002 14:53:13 +0200 (MET DST)


I found a problem with scale function,
while using center=FALSE and scale=TRUE:

all column are not divided by standard error,
but divided by sqrt (1/(n-1) sum Xi^2 )

Example:
> l<- c(1,2,3)
> scale(l,F,T)
          [,1]
[1,] 0.3779645
[2,] 0.7559289
[3,] 1.1338934
attr(,"scaled:scale")
[1] 2.645751

2.645751 = sqrt( 1/2 * (1+4+9) )


Antoine Lucas & Aymeric Labourdette 

--
Antoine  Lucas        
INRA, Unité de biométrie et     |  Tel 05 61 28 53 34
intelligence artificielle       |  Fax 05 61 28 53 35
http://genopole.toulouse.inra.fr/~lucas


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._