Description Usage Arguments Value References See Also Examples

Wong's dissimilarity index is a development of
`DIDuncan`

's which takes into account the interactions
between spatial units(common boundaries and perimeter/area ratios).
The function can be used in two ways: to provide spatial data (
boundaries matrix, a perimeter vector and an area vector)
or a external geographic information source (spatial object or shape file).

1 2 |

`x` |
- an object of class matrix (or which can be coerced to that class), where each column represents the distribution of a group within spatial units. The number of columns should be greater than 1 (at least 2 groups are required). You should not include a column with total totals because this will be interpreted as a group |

`b` |
- a common boundaries matrix where each element |

`a` |
- a numeric vector containing spatial unit areas |

`p` |
- a numeric vector containing spatial units perimeters. |

`ptype` |
- a string variable giving two options for perimeter calculation when a spatial object or shapefile is provided: 'int' to use only interior borders of spatial units, and 'all' to use entire borders, including to the exterior of the area |

`variant` |
- a character variable that allows to choose the index version: variant = 's' for the dissimilarity index adjusted for contiguous spatial units boundary lengths and perimeter/area ratio (by default) and variant = 'w' for the version without perimeter/area ratio |

`spatobj` |
- a spatial object (SpatialPolygonsDataFrame) with geographic information |

`folder` |
- a character vector with the folder (directory) name indicating where the shapefile is located on the drive |

`shape` |
- a character vector with the name of the shapefile (without the .shp extension). |

a matrix containing Wong's dissimilarity index values

Wong D. W. S. (1993) *Spatial Indices of Segregation*.
Urban Studies, 30 (3), pp. 559-572.

Other one-group evenness indices:
`ISDuncan`

, `Gini`

, `Gorard`

,
`Atkinson`

, `HTheil`

,
'`ISWong`

, `ISMorrill`

, `ISMorrillK`

Between groups dissimilarity indices:
`DIDuncan`

, `DIMorrill`

, `DIMorrillK`

1 2 3 4 5 6 7 8 9 10 11 12 | ```
x <- segdata@data[ ,1:2]
bound <- boundaries(segdata)
per <- perimeter(segdata)
ar <- area(segdata)
foldername <- system.file('extdata', package = 'OasisR')
shapename <- 'segdata'
DIWong(x, b = bound, p = per, a = ar)
DIWong(x, spatobj = segdata, variant = 'w')
DIWong(x, folder = foldername, shape = shapename, ptype ='all')
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.