Last chance! 50% off unlimited learning
Sale ends in
krigeInterp(x, y = NULL, z = NULL, gridPoints = 21,
xo = seq(min(x), max(x), length = gridPoints),
yo = seq(min(y), max(y), length = gridPoints),
extrap = FALSE, polDegree = 6)
x
and y
are
two numeric vectors of grid pounts, and z
is a numeric
matrix or any other rectangular object which can be transformed
by the function as.matrix
into x
and y
direction.TRUE
then the data points are extrapolated.krigeInterp
returns a list with at least three entries, x
, y
and z
. Note, that the returned values, can be directly
used by the persp
and contour
3D plotting methods.akimaInterp
,
linearInterp
.## krigeInterp -
# Kriging:
set.seed(1953)
x = runif(999) - 0.5
y = runif(999) - 0.5
z = cos(2*pi*(x^2+y^2))
ans = krigeInterp(x, y, z, extrap = FALSE)
persp(ans, theta = -40, phi = 30, col = "steelblue",
xlab = "x", ylab = "y", zlab = "z")
contour(ans)
Run the code above in your browser using DataLab