Learn R Programming

OasisR (version 1.0.0)

RCL: A function to compute the relative clustering index (RCL)

Description

The index compares the mean proximity of a group and its mean promiximy to another group. The function can be used in two ways: by providing a distance matrix or a geographic source (spatial object or shape file) wich will be used to compute the matrix within the function

Usage

RCL(x, d = NULL, 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
d
- a matrix with the distances between spatial units centroids
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 matrix with RCL values

References

Massey D. S. and Denton N. A. (1988) The dimensions of residential segregation. Social Forces 67(2), pp. 281-315.

See Also

Absolute Clustering Index: ACL Other intergroup clustering measures: Pxy, SP

Examples

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

RCL(x, d = dist)

RCL(x, spatobj = GreHSize)

RCL(x, folder = foldername, shape = shapename)

Run the code above in your browser using DataLab