When the feature IDs need to be changed in SpatialLines* or SpatialPolygons* objects, these methods may be used. The new IDs should be a character vector of unique IDs of the correct length.
methods
Methods
obj = "SpatialLines", x = "character": replace IDs in a SpatialLines object
obj = "SpatialLinesDataFrame", x = "character": replace IDs in a SpatialLinesDataFrame object
obj = "SpatialPolygons", x = "character": replace IDs in a SpatialPolygons object
obj = "SpatialPolygonsDataFrame", x = "character": replace IDs in a SpatialPolygonsDataFrame object
Note
It is usually sensible to keep a copy of the original feature IDs in the object, but this should be done by the user.