View source: R/frontier_as_sf.R
frontier_as_sf | R Documentation |
Converts a frontier_model created by frontier_detect into an sf line object. Default geometry are lines.
frontier_as_sf(
frontier_model,
convert2Line = T,
non_frontiers = F,
edgelistOnly = F,
silent = F
)
frontier_model |
A object of calls frontier_model created by frontier_detect |
convert2Line |
Boolean value indicating if we want to return borders as line geometries. If FALSE then it will return all types of geometries created by the st_intersects function used by the routine (see details). This includes points. |
non_frontiers |
Boolean value indicating if non-frontier borders are also returned. Default FALSE to speed up processing (see details). |
edgelistOnly |
Boolean value indicating where or not to extract edgelist only without sf geometry. Default FALSE to return sf geometry. |
silent |
Boolean. To print progress or not. Default FALSE |
This is strictly for 1) graphing purposes or 2) for spatial operations Recommended to use edgelists for statistical analysis (wip)
Implementation basically requires us to: 1) Make an edge list of all bordering polygons with an indicator frontier if they are a frontier (and include phi from the binomial inla) 2) From that edge list use st_intersect to extract ALL borders Issue current method uses do.call(rbind) which is inefficient as number of list items grows Original code: frontier creation source line 80+ onwards
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.