View source: R/sp_reset_feature_ids.R
sp_reset_feature_ids | R Documentation |
sp_reset_feature_ids
will reset the feature IDs in a spatial object to
sequential integers (beginning at 1), but these will be stored as a characters.
If the spatial object has a data slot, the row names of the data frame will
also be reset.
sp_reset_feature_ids(sp)
sp |
A spatial object. |
Spatial object.
Stuart K. Grange
## Not run:
# Load data
sp_zones <- sp_read("zones.json")
# Filter
sp_zones <- subset(sp_zones, country == "DE")
# Reset feature ids
sp_zones <- sp_reset_feature_ids(sp_zones)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.