View source: R/highlight.borders.R
highlight.borders | R Documentation |
Creates an sf data.frame object (from the sf package) identifying a subset of borders between neighbouring areas, which allows them to be overlayed on a map. An example is given in the vignette accompanying this package.
highlight.borders(border.locations, sfdata)
border.locations |
A K by K matrix, where K is the number of areas, containing 3 distinct values: NA for non-neighbouring areas; 0 for borders between neighbouring areas to be highlighted on a map; and 1 for borders between neighbouring areas not to be highlighted on a map. |
sfdata |
An sf data.frame (from the sf package) object used for plotting the data and creating the original neighbourhood matrix W. |
An sf data.frame object from the sf package, which contains the vertices of all the borders to be highlighted on the map. The mapping can be done using the mapview package, see the vignette accompanying this package for an example.
Duncan Lee
## See the vignette accompanying this package for an example of its use.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.