[R] what is scale function? Is it for variable transformation?

Kjetil Brinchmann Halvorsen kjetilbrinchmannhalvorsen at gmail.com
Sun Mar 5 15:46:45 CET 2006


Kum-Hoe Hwang wrote:
> HOwdy
> 
> I read R books about scale function for variable transformation.
> Acoording to this  book
> scale function leads me to better regression results. Or am I worng?
> 
> I hope somebody tell me about a scale function?
> Is it for variable transformation?

Did you try to read
?scale
?

Look at:
 > x <- rnorm(100, 5, 10)
 > mean(x)
[1] 4.304616
 > sd(x)
[1] 9.926883
 > x <- scale(x)
 > mean(x)
[1] 5.39499e-17
 > sd(x)
[1] 1

Kjetil


> 
> 
> 
> 
> --
> Kum-Hoe Hwang, Phone : 82-31-250-3516Email : phdhwang at gmail.com
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>




More information about the R-help mailing list