# Function scale (PR#2209)

**Peter Dalgaard BSA
**
p.dalgaard@biostat.ku.dk

*24 Oct 2002 15:28:43 +0200*

lucas@toulouse.inra.fr writes:
>* 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) )
*
And? That's exactly what the documentation says will happen. And
exactly what Splus does, even if perhaps surprising.
--
O__ ---- Peter Dalgaard Blegdamsvej 3
c/ /'_ --- Dept. of Biostatistics 2200 Cph. N
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk) FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._