Interpolate univariate data on regular 3D grid to new 3D grid
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,
Gregory Jefferis, PhD and:
Department of Zoology St John's College
University of Cambridge Cambridge
Downing Street CB2 1TP
Cambridge, CB2 3EJ