plothot {DRHotNet} | R Documentation |
Plots an object obtained with DiffHotspots_n_k
Description
This function plots a set of differential risk hotspots located along a linear network. An extension of the hotspots (including the kth order neighbours of the segments of the hotspots) is also plotted
Usage
plothot(X, hotspots, order_extension = NULL, which.plot = NULL, eps_image = F)
Arguments
X |
- A |
hotspots |
- A set of differential risk hotspots obtained with the function |
order_extension |
- A natural number indicating a neighbourhood order to be used for constructing an extension of the differential risk hotspots. The summary is also given for the segments forming this extension |
which.plot |
- A numeric vector indicating which differential risk hotspots to plot (according to the way they are ordered in |
eps_image |
- If set to |
Examples
library(DRHotNet)
library(spatstat.geom)
library(spatstat.linnet)
library(spdep)
library(raster)
rel_assault <- relpnet(X = chicago,
lixel_length = 50, h = 50, mark = "marks", category_mark = "assault")
hotspots_assault <- drhot(X = chicago, rel_probs = rel_assault,
k = 0.5, n = 4)
plothot(X = chicago, hotspots = hotspots_assault)