[R] Interpolate univariate data on regular 3D grid to new 3D grid
Gregory Jefferis
gsxej2 at cam.ac.uk
Tue Mar 14 19:13:31 CET 2006
Dear R Users,
I have some data that is very similar in form to a 3D image - ie univariate
data on a regular 3D grid. I keep this as a 3D numeric array in R with
attributes describing the sampling points along the 3 dimensions.
I would like to interpolate this onto a new regular 3D grid that I specify
(eg by supplying 3 vectors corresponding to the new grid locations on each
of the 3 dimensions). Interpolation methods would ideally include nearest
neighbour and linear.
The arrays can be large (> 1e7 points) so I would like this to be efficient.
I can find lots of 1d or 2d interpolation methods but no 3d ones and
anything that I write will probably take me a while to optimise.
Many thanks for any suggestions,
Greg Jefferis.
--
Gregory Jefferis, PhD and:
Research Fellow
Department of Zoology St John's College
University of Cambridge Cambridge
Downing Street CB2 1TP
Cambridge, CB2 3EJ
United Kingdom
Lab Tel: +44 (0)1223 336683 Office: +44 (0)1223 339899
Lab Fax: +44 (0)1223 336676
http://www.zoo.cam.ac.uk/zoostaff/jefferis.html gsxej2 at cam.ac.uk
More information about the R-help
mailing list