sgChVIDs {SpatialGraph} | R Documentation |
Change vertex IDs in a SpatialGraph
Description
Change the field "ID" in the vertex slot, v
, of a
SpatialGraph. The fields v0
and v1
of the edge
slot, e
, are accordingly updated
Usage
sgChVIDs(obj, IDa, IDp = NULL)
Arguments
obj |
A SpatialGraph object |
IDa |
A vector indicating the updated vertex IDs |
IDp |
A vector indicating the prior vertex IDs |
Details
If IDp
is not provided, it is assumed that the vector of
updated indexes is sorted equally to the order in which the vertices
are stored in the slot v
of the SpatialGraph. If
IDp
is provided, the mapping IDp -> IDa is used
for reclassifying the vertices.
Value
A SpatialGraph object
[Package SpatialGraph version 1.0-4 Index]