[R] resclaing/resampling data
Jan M. Wiener
jan.wiener at college-de-france.fr
Fri Oct 19 13:42:20 CEST 2007
hello,
I am trying to rescale a matrix according to one column in the matrix.
Imagine having two matrices with 2 columns each:
mat1:
1 2.1
2 2.2
3 2.2
4 2.4
5 2.7
6 2.9
mat2:
1 1.9
2 2.0
3 2.1
4 2.2
5 2.4
6 3.0
7. 2.8
I now want to rescale mat2 such that the values in columns 1 are also
between 1 and 6 (as in mat1). Of, course the values in column 2 should
be rescaled accordingly (simple interpolation).
Are there any predefined functions in R that does such rescaling?
Thanks for any answers,
Jan
--
Dr. Jan M. Wiener
LPPA - Collège de France - CNRS
11, place Marcelin Berthelot
75005 Paris, France
-
e-mail: mail at jan-wiener.net
url: www.jan-wiener.net
phone: +33 (0)1 44 27 14 21
More information about the R-help
mailing list