[R] Rescaling a column in a matrix based on a certain rows

From: Anh Tran <popophobia_at_gmail.com>
Date: Fri, 09 May 2008 12:51:45 -0700


Hi,
Let say I have this matrix:

> mat<-matrix(cbind(rnorm(20),rnorm(20)), ncol = 2)

And I want to rescale values of column [,1] and [,2] using values from row 1 to 5, such that the values of row 1:5 should be rescale to the same amplitude (kinda like take the z-score of population from row 1:5). column 1 and 2 are two different samples need to be compared.

I hope I made myself clear enough. thanks for any help

UCLA Neurology Research

-- 
Regards,
Anh Tran

	[[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 Fri 09 May 2008 - 20:29:56 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 Fri 09 May 2008 - 21:30:45 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