[R] Function to standardize matriz?

Linlin Yan yanlinlin82 at gmail.com
Thu Jul 30 07:13:00 CEST 2009


Did you mean this:

> m <- matrix(1:12, 3, 4)
> m / max(m)
           [,1]      [,2]      [,3]      [,4]
[1,] 0.08333333 0.3333333 0.5833333 0.8333333
[2,] 0.16666667 0.4166667 0.6666667 0.9166667
[3,] 0.25000000 0.5000000 0.7500000 1.0000000

On Thu, Jul 30, 2009 at 12:52 PM, Sam<samanta.fernandez at gmail.com> wrote:
> Hi,
> this is probably a very basic question but I'm just learning R and i
> cannot find  a function to standardize a data matrix..
> I'll be grateful for any tips or help you can provide me.
>
> Thank you very much!
>
> ______________________________________________
> 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.
>




More information about the R-help mailing list