Learn R Programming

SpatialPosition (version 2.1.2)

plotHuff: Plot a Huff Raster

Description

This function plots the raster produced by the rasterHuff function.

Usage

plotHuff(x, add = FALSE)

Value

Display the raster nicely.

Arguments

x

raster; output of the rasterHuff function.

add

logical; if TRUE the raster is added to the current plot, if FALSE the raster is displayed in a new plot.

See Also

huff, rasterHuff.

Examples

Run this code
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)
plotHuff(myhuffraster)

Run the code above in your browser using DataLab