powered by
The function is based on sf package and it can be used with a shape file or an R spatial object (class sf, sfc or sfg).
boundaries(spatobj = NULL, folder = NULL, shape = NULL)
A common boundaries matrix
- a spatial object (class sf, sfc or sfg) containing geographic information
- a character vector with the folder (directory) name indicating where the shapefile with the geographic information is located.
- a character vector with the name of the shapefile (without the .shp extension) which contains the geographic information
Other spatial functions used for segregation indices computation: area, contig, perimeter, distance, distcenter
area
contig
perimeter
distance
distcenter
boundaries(segdata) foldername <- system.file('extdata', package = 'OasisR') shapename <- 'segdata' boundaries(folder = foldername, shape = shapename)
Run the code above in your browser using DataLab