perimeter | R Documentation |
The function is based on on sf package and can be used with a shape file or an R spatial object (class sf, sfc or sfg).
perimeter(spatobj = NULL, folder = NULL, shape = NULL)
spatobj |
a spatial object (class sf, sfc or sfg) containing geographic information |
folder |
a character vector with the folder (directory) name indicating where the shapefile with the geographic information is located. |
shape |
a character vector with the name of the shapefile (without the .shp extension) which contains the geographic information |
A vector containing the perimeter of spatial units
Other spatial functions used for segregation indices
computation: area
, contig
,
distance
, distcenter
,
boundaries
perimeter(segdata)
foldername <- system.file('extdata', package = 'OasisR')
shapename <- 'segdata'
perimeter(folder = foldername, shape = shapename)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.