card
Cardinalities for neighbours lists
The function tallies the numbers of neighbours of regions in the neighbours list.
 Keywords
 spatial
Usage
card(nb)
Arguments
 nb
 a neighbours list object of class
nb
Details
“nb” objects are stored as lists of integer vectors, where the vectors contain either the indices in the range 1:n
for n
as length(nb) of the neighbours of region i
, or as.integer(0)
to signal no neighbours. The function card(nb)
is used to extract the numbers of neighbours from the “nb” object.
Value

An integer vector of the numbers of neighbours of regions in the neighbours
list.
References
Bivand R, Pebesma EJ, GomezRubio V, (2008) Applied Spatial Data Analysis with R, Springer, New York, pp. 239251; Bivand R, Portnov B, (2004) Exploring spatial data analysis techniques using R: the case of observations with no neighbours. In: Anselin L, Florax R, Rey S, (eds.), Advances in Spatial Econometrics, Methodology, Tools and Applications. Berlin: SpringerVerlag, pp. 121142.
See Also
Examples
example(columbus)
table(card(col.gal.nb))