krigeInterp {fBasics} | R Documentation |
Bivariate Krige Interpolation.
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, y, z |
the arguments |
gridPoints |
an integer value specifying the number of grid points in |
xo, yo |
two numeric vectors of data points spanning the grid. |
extrap |
a logical, if |
polDegree |
the polynomial krige degree, an integer ranging between 1 and 6. |
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.
The function krigeInterp
requires loading of the R package
spatial
.
## 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)