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@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@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]]