[R] Scale function

pellegrini pellegrini at ill.fr
Tue Jan 29 16:16:29 CET 2008


Hello everybody,

There is something that I do not get with scale function.

Say that I have a vector v <- c(1,2,3,4,5,6),

scale(v,center=TRUE,scale=TRUE) gives a new vector with 0 as mean and 1 
as standard deviation.

but,

scale(v, center=FALSE,scale=TRUE) gives a new vector with a standard  
deviation different from 1.

I would also expect a standard deviation of 1 in that case.

am I wrong ?

thanks

Eric Pellegrini



More information about the R-help mailing list