[R] Resample a matrix (table)

Luca Penasa luca.penasa at email.it
Mon Nov 12 19:10:23 CET 2007


I have a matrix of values... for exemple the matrix could be 100 rows
and 50 columns...
I would like to resample the matrix to obtain a new matrix -> a 10x5 matrix
So i need to calculate a new value for every cell, i would like to use a
weightened mean to do this. I explain this thing better:
In the exemple the original matrix would be divided into 50
partial-matrix, for every partial-matrix should be extracted a value
obtained from a weightened mean: the cell at center of the
partial-matrix should have the max importance into the mean, the fhurter
cell should have the lower importance (something like a gaussian shape,
where i can decide the sigma used).... In this way i'll obtain a
resampled matrix with the values calculated using a weightened mean of
the single partial-matrix...

Is there anybody who can suggest me a way to do this??? is there a
function that can do this?

PS: sorry for my english... and... im a newbie, please try to explain in
a simple way.. thank you

Luca Penasa,
geology student,
University of Padua, Italy


 
 
 --
 Email.it, the professional e-mail, gratis per te: http://www.email.it/f
 
 Sponsor:
 In REGALO 'All the Good Thing' di NELLY FURTADO
 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=6617&d=12-11



More information about the R-help mailing list