Learn R Programming

OasisR (version 1.0.0)

area: A function to compute the spatial units' areas

Usage

area(spatobj = NULL, folder = NULL, shape = NULL)

Arguments

spatobj
- a Spatial object (SpatialPolygonsDataFrame)
folder
- a character vector with the folder (directory) where the shapefile is
shape
- a character vector with the name of the shapefile (without the .shp extension)

Value

  • A vector with spatial units'areas. } description{ The function is based on pkg{rgdal} package and can be used by providing a shape file or a R spatial object (SpatialPolygonsDataFrame). } examples{ area(GreHSize) foldername <- system.file('extdata', package = 'OasisR') shapename <- 'GreHSize'area(folder = foldername, shape = shapename) } seealso{ Other spatial functions used for segregation indices computation: code{contig}, code{perimeter}, code{distance}, code{distcenter}, code{boundaries}, code{xgeo} }