Re: [R] (no subject)

From: Jorge Ivan Velez <jorgeivanvelez_at_gmail.com>
Date: Thu, 08 May 2008 09:24:01 -0400

Hi Paticia,

Perhaps ?scale is what you are looking for:

X=matrix(1:9,ncol=3)

[,1] [,2] [,3]
[1,]    1    4    7
[2,]    2    5    8
[3,]    3    6    9

scale(X)

[,1] [,2] [,3]
[1,]   -1   -1   -1
[2,]    0    0    0
[3,]    1    1    1

attr(,"scaled:center")
[1] 2 5 8
attr(,"scaled:scale")
[1] 1 1 1

HTH, Jorge

On Thu, May 8, 2008 at 6:48 AM, patricia garcía gonzález < kurtney_84_at_hotmail.com> wrote:

>
> Hi everyone,
>
> Is there any function to standardize a matrix. For sure it must, but i
> can't find it. For standardize, i just mean, to make the mean as zero and
> standard deviation as one.It is also call z-score.
> Thanks in advance
>
>
>
> _________________________________________________________________
> MSN Video.
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

        [[alternative HTML version deleted]]



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Thu 08 May 2008 - 13:29:08 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 08 May 2008 - 13:30:35 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive