View source: R/gradientInterpolation.R
interpCov | R Documentation |
At the moment, this is based on the function interp.surface
from
the package fields (bilinear interpolation).
interpCov(locs, x_grid, y_grid, cov_mat)
locs |
Point where the covariate should be interpolated |
x_grid |
Grid on which the covariate is known |
y_grid |
Grid on which the covariate is known |
cov_mat |
Matrix of values of the covariate at the points given by x_grid and y_grid. |
Note that covmat needs to rotated (as e.g. with "image"), so you might need to use something like covmat <- t(apply(as.matrix(covraster),2,rev)) before passing it to this function
Interpolated value of the covariate at the point xy.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.