Number of zones
Extract the number of zones in an object.
number_of_zones(x) ## S4 method for signature 'ConservationProblem' number_of_zones(x) ## S4 method for signature 'OptimizationProblem' number_of_zones(x) ## S4 method for signature 'ZonesRaster' number_of_zones(x) ## S4 method for signature 'ZonesCharacter' number_of_zones(x)
x |
|
integer
number of zones.
# load data data(sim_pu_zones_stack, sim_features_zones) # print number of zones in a Zones object print(number_of_zones(sim_features_zones)) # create problem with multiple zones p <- problem(sim_pu_zones_stack, sim_features_zones) %>% add_min_set_objective() %>% add_relative_targets(matrix(0.2, ncol = 3, nrow = 5)) %>% add_binary_decisions() # print number of zones in the problem print(number_of_zones(p))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.