Description Usage Arguments Value NOTE References See Also
If ncp
is zero, linear
interpolation is used in the triangles bounded by data points.
Cubic interpolation is done if partial derivatives are used.
If extrap
is FALSE
, zvalues for points outside the convex hull are
returned as NA
.
No extrapolation can be performed if ncp
is zero.
The interpp
function handles duplicate (x,y)
points in
different ways. As default it will stop with an error message. But it
can give duplicate points an unique z
value according to the
parameter duplicate
(mean
,median
or any other
user defined function).
The triangulation scheme used by interp
works well if x
and y
have
similar scales but will appear stretched if they have very different
scales. The spreads of x
and y
must be within four orders of magnitude
of each other for interpp
to work.
1 2 3 4  interpp.old(x, y, z, xo, yo, ncp = 0, extrap = FALSE,
duplicate = "error", dupfun = NULL)
interpp.new(x, y, z, xo, yo, extrap = FALSE,
duplicate = "error", dupfun = NULL)

x 
vector of xcoordinates of data points or a

y 
vector of ycoordinates of data points. Missing values are not accepted. If left as NULL indicates that 
z 
vector of zcoordinates of data points or a character variable
naming the variable of interest in the
Missing values are not accepted.

xo 
vector of xcoordinates of points at which to evaluate the interpolating
function. If 
yo 
vector of ycoordinates of points at which to evaluate the interpolating function. If operating on 
ncp 
deprecated, use parameter meaning was:
number of additional points to be used in computing partial
derivatives at each data point.

extrap 
logical flag: should extrapolation be used outside of the convex hull determined by the data points? 
duplicate 
indicates how to handle duplicate data points. Possible values are

dupfun 
this function is applied to duplicate points if 
list with 3 components:
x 
vector of xcoordinates of output points, the same as the input
argument 
y 
vector of ycoordinates of output points, the same as the input
argument 
z 
fitted zvalues. The value 
If input is SpatialPointsDataFrame
than an according
SpatialPointsDataFrame
is returned.
Use interp
if interpolation on a regular grid is wanted.
The two versions interpp.old
and interpp.new
are now
deprecated, use interpp
instead, see details there.
Earlier versions (pre 0.51) of interpp
used the parameter
ncp
to choose between linear and cubic interpolation, this is now done
by setting the logical parameter linear
. Use of ncp
is still
possible, but is deprecated.
Akima, H. (1978). A Method of Bivariate Interpolation and Smooth Surface Fitting for Irregularly Distributed Data Points. ACM Transactions on Mathematical Software, 4, 148164.
Akima, H. (1996). Algorithm 761: scattereddata surface fitting that has the accuracy of a cubic polynomial. ACM Transactions on Mathematical Software, 22, 362371.
contour
, image
,
approxfun
, splinefun
,
outer
, expand.grid
,
interp
, aspline
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.