Description Usage Arguments Value Examples
View source: R/PWN_functions.R
Identify for each element in a SpatialPolygons object, its n closest neighbours.
1 2 | identify_n_neighbours(Spat.polygons, n, append = F,
col.prefix = "IDneighb_")
|
Spat.polygons |
A SpatialPolygons(DataFrame) |
n |
The nr of neighbouring polygons to detect |
append |
Should the output be appended to the data in the SpatialPolygonsDatafrmae |
col.prefix |
A prefix to use in the output of the columns that include hold the IDs of the neighbours |
a SpatialPolygonsDataframe with a column with unique IDs and n columns holding the IDs of the n closest neighbours
1 2 3 4 5 | ## Not run:
Decline.cluster <- shapefile('E:/beckpie/PWN/vector_data/Decline_N_tree_clusters.shp')
tt <- identify_n_neighbours(Spat.polygons = Decline.cluster,n=2,append=T)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.