Description Usage Arguments Examples
Tunction to perform kriging with automatic model selection using the function autoKrige
.
Can generate continuous raster surfaces of interpolated values.
1 2 3 4 5 6 7 8 9 |
frml |
formula that defines the dependent variable as a linear model of independent variables; suppose the dependent variable has name 'z', for ordinary and simple kriging use the formula 'z~1'; for simple kriging also define 'beta' (see below); for universal kriging, suppose 'z' is linearly dependent on 'x' and 'y', use the formula 'z~x+y'. |
input_data |
sp object containing the data to be interpolated |
pred_locations |
sp object containing the prediction locations. If you want to krige values onto a continuous grid
transform a raster to point object using |
raster_out |
logical, indicating if an interpolated raster or a table is desired as output |
dem |
raster object, a digital elevation model, will be used in the function |
verbose |
logical, should intermediate messages be printed? |
... |
parameters passed on to |
1 2 3 4 5 6 | dem <- raster::raster('dem.tif')
st_grd <- raster::rasterToPoints(dem, spatial = T)
data_in <- rgdal::readOGR('points.shp') #A shapefile containing values to be interpolated in a column called 'resid'
result <- rg_krige(frml = resid ~ 1, input_data = data_in, pred_locations = st_grd, raster_out = T, dem = dem)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.