krig_gd | R Documentation |
Perform interpolation of the raster(s) produced by window_gd using autoKrige
krig_gd(
r,
grd = NULL,
index = 1,
coords = NULL,
agg_grd = NULL,
disagg_grd = NULL,
agg_r = NULL,
disagg_r = NULL,
autoKrige_output = FALSE,
lower_bound = TRUE,
upper_bound = TRUE,
krig_method = "ordinary",
resample = FALSE,
resample_first = TRUE
)
r |
SpatRaster produced by window_gd |
grd |
object to create grid for kriging; can be a SpatRaster or RasterLayer. If undefined, will use |
index |
integer indices of layers in raster stack to krige (defaults to 1; i.e., the first layer) |
coords |
if provided, kriging will occur based only on values at these coordinates. Can be provided as an sf points, a two-column matrix, or a data.frame representing x and y coordinates |
agg_grd |
factor to use for aggregation of |
disagg_grd |
factor to use for disaggregation of |
agg_r |
factor to use for aggregation of |
disagg_r |
factor to use for disaggregation, of |
autoKrige_output |
whether to return full output from autoKrige including uncertainty rasters (defaults to FALSE). If TRUE, returns a list with the kriged input raster layer ("raster"), kriged variance ("var"), kriged standard deviation ("stdev"), and full autoKrige output ("autoKrige_output"). |
lower_bound |
if TRUE (default), converts all values in the kriged raster less than the minimum value of the input raster, to that minimum |
upper_bound |
if TRUE (default), converts all values in the kriged raster greater than the maximum value of the input raster, to that maximum |
krig_method |
method to use for kriging. If |
resample |
whether to resample |
resample_first |
if aggregation or disaggregation is used in addition to resampling, specifies whether to resample before (resample_first = TRUE) or after (resample_first = FALSE) aggregation/disaggregation (defaults to TRUE) |
a SpatRaster object or a list of autoKrige outputs (if autoKrige_output = TRUE)
load_mini_ex()
wpi <- window_gd(mini_vcf, mini_coords, mini_lyr, L = 10, rarify = TRUE)
kpi <- krig_gd(wpi, mini_lyr)
plot_gd(kpi, main = "Kriged Pi")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.