Learn R Programming

spdep (version 0.5-74)

summary.nb: Print and summary function for neighbours and weights lists

Description

The function prints summary measures for links in a neighbours list. If a matrix of coordinates is given as well, summary descriptive measures for the link lengths are also printed. Print and summary functions are also available for "listw" weights list objects.

Usage

## S3 method for class 'nb':
summary(object, coords=NULL, longlat = NULL, scale = 1, ...)
## S3 method for class 'nb':
print(x, ...)
## S3 method for class 'listw':
summary(object, coords, longlat, zero.policy = NULL,
 scale = 1, ...)
## S3 method for class 'listw':
print(x, zero.policy = NULL, ...)

Arguments

object
an object of class nb
coords
matrix of region point coordinates or a SpatialPoints object
longlat
TRUE if point coordinates are longitude-latitude decimal degrees, in which case distances are measured in kilometers; if coords is a SpatialPoints object, the value is taken from the object itself
...
additional arguments affecting the output produced
x
an object of class nb
zero.policy
default NULL, use global option value; if FALSE stop with error for any empty neighbour sets
scale
passed through to stem() for control of plot length

See Also

plot.nb

Examples

Run this code
example(columbus)
coords <- coordinates(columbus)
col.gal.nb
summary(col.gal.nb, coords)
col.listw <- nb2listw(col.gal.nb, style="W")
col.listw
summary(col.listw)

Run the code above in your browser using DataLab