rasterStewart | R Documentation |
This function creates a raster from a regularly spaced
Stewart points grid (output of the stewart
function).
rasterStewart(x, mask = NULL)
x |
sp or sf object; output of the |
mask |
sp or sf object; this object is used to clip the raster. (optional) |
Raster of potential values.
stewart, quickStewart, plotStewart, CreateGrid, CreateDistMatrix.
library(raster)
data(hospital)
# Compute Stewart potentials from known points (hospital) on a
# grid defined by its resolution
mystewart <- stewart(knownpts = hospital, varname = "capacity",
typefct = "exponential", span = 1000, beta = 3,
resolution = 100, mask = paris)
# Create a raster of potentials values
mystewartraster <- rasterStewart(x = mystewart, mask = paris)
plot(mystewartraster)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.