I have a dataframe composed of three numeric variables (x,y,z) which are the coordinates of a 3D surface obtained from interp2xyz
from the akima
package.
x y z
0.600 0.02 42.801
0.604 0.02 42.527
0.609 0.02 42.253
0.614 0.02 41.979
0.618 0.02 41.705
0.623 0.02 41.430
... ... ...
I want to perform an Hermite cubic spline (eg. z=f(x,y)) saving the function into a variable in the same fashion as splinefun()
or approxfun()
do, so that I can use it later with (x,y) inputs. Is there a way to do this?