st_thin | R Documentation |
Nearest neighbours spatial thinning of polygonal grids
st_thin(x, lag)
x |
an sf data.frame. |
lag |
lag order. |
a thinned sf::st_as_sf()
object.
This function is still under development.
Based on SO answer: https://stackoverflow.com/questions/65907022/
## Not run: require(rangeMapper) con = rmap_connect() wrens = read_wrens() rmap_add_ranges(con, x = wrens, ID = 'sci_name') rmap_prepare(con, 'hex', cellsize=500) rmap_save_map(con) x = rmap_to_sf(con)[, 'cell_id'] plot( st_thin(x,2) ) x = x[ ! x$cell_id %in% c(282,265) , ] plot( st_thin(x,3) ) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.