zone_names {prioritizr} | R Documentation |
Zone names
Description
Extract the names of zones in an object.
Usage
zone_names(x, ...)
## S3 method for class 'ConservationProblem'
zone_names(x, ...)
## S3 method for class 'ZonesRaster'
zone_names(x, ...)
## S3 method for class 'ZonesSpatRaster'
zone_names(x, ...)
## S3 method for class 'ZonesCharacter'
zone_names(x, ...)
Arguments
x |
|
... |
not used. |
Value
A character
vector of zone names.
Examples
## Not run:
# load data
sim_zones_pu_raster <- get_sim_zones_pu_raster()
sim_zones_features <- get_sim_zones_features()
# print names of zones in a Zones object
print(zone_names(sim_zones_features))
# create problem with multiple zones
p <-
problem(sim_zones_pu_raster, sim_zones_features) %>%
add_min_set_objective() %>%
add_relative_targets(matrix(0.2, ncol = 3, nrow = 5)) %>%
add_binary_decisions()
# print zone names in problem
print(zone_names(p))
## End(Not run)
[Package prioritizr version 8.0.4 Index]