Subset an Object of Class "spatial.neighbor"

DESCRIPTION:
Obtains a subset of an object of class "spatial.neighbor".

USAGE:
spatial.subset(neighbor, region.id, data=NULL, subset=NULL,
               reorder=F, parameters=NULL, weights=NULL)

REQUIRED ARGUMENTS:
neighbor:
an object of class "spatial.neighbor".
region.id:
a vector of ids for the set of all spatial units. The row.id and col.id variables in the object neighbor are obtained from this vector of identifiers. The order of values in vector region.id must be identical to the order of values in any data frames containing information on the spatial lattice, where each row in the data frame corresponds to a single spatial region.

OPTIONAL ARGUMENTS:
data:
if a data frame is associated with the spatial neighbor object, a subset for the data frame may also be obtained. The number of rows in the data frame must be identical to the number of elements in vector region.id.
subset:
a vector of integers or logical values which can be used to index the elements in vector region.id.
reorder:
if TRUE, the variables row.id, col.id, and matrix in the neighbor object are recoded to be sequential integer values.
parameters:
a vector of parameters which may be present in a spatial model for a covariance structure. If present, these are sorted to correspond to the elements in the component matrix of neighbor.
weights:
a vector with length equal to the length of vector region.id.

VALUE:
a list containing the appropriate subset (or reordering) of the arguments neighbor, data, parameters, and weights.

DETAILS:
This routine is used to obtain subsets of objects of class "spatial.neighbor", primarily for use with the spatial regression routines.

SEE ALSO:
spatial.neighbor .

EXAMPLES:
spatial.subset(sids.neighbor, region.id=sids$id, data=sids, subset=-4)