rasterHuff | R Documentation |
This function creates a raster from a regularly spaced
Huff grid (output of the huff
function).
rasterHuff(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 catchment areas values.
huff, plotHuff.
library(raster)
data(hospital)
# Compute Huff catchment areas from known points (hospital) on a
# grid defined by its resolution
myhuff <- huff(knownpts = hospital, varname = "capacity",
typefct = "exponential", span = 750, beta = 2,
resolution = 100, mask = paris, returnclass = "sf")
# Create a raster of huff values
myhuffraster <- rasterHuff(x = myhuff, mask = paris)
plot(myhuffraster)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.