50% off | Unlimited Data & AI Learning

Last chance! 50% off unlimited learning

Sale ends in


OasisR (version 1.0.0)

xseg: A function to compute all segregation indices developped in OasisR

Description

A general function that computes all segregation indexes available in OasisR package

Usage

xseg(x, center = 1, fdist = 'l', spatobj = NULL, folder = NULL, shape = NULL )

Arguments

x
- an object of class matrix (or that can be coerced to that class), where each column represents the distribution of a population group, within spatial units. The number of columns should be greater than one (at least two population groups are require
center
- a value giving the number of the spatial unit that represents the area's center
fdist
- the method used for distance calculations: 'l' for linear (by default) and 'e' for exponential function.
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 list with segregation indices

References

Tivadar M., Schaeffer Y, Torre A. and Bray F. (2014) OASIS - un Outil d'Analyse de la Segregation et des Inegalites Spatiales. Cybergeo : European Journal of Geography, GeOpenMod, document 699

See Also

xgeo function which computes all geografical information necessary for segregation indices MCTest function which computes Monte Carlos simulations to test segregation indexes

Examples

Run this code
x <- slot(AnnHAge, 'data')[ ,3:5]
foldername <- system.file('extdata', package = 'OasisR')
shapename <- 'AnnHAge'

xseg(x, center = 1, spatobj = AnnHAge)

xseg(x, center = 1, folder = foldername, shape = shapename)

Run the code above in your browser using DataLab