Learn R Programming

prioritizr (version 4.1.5)

irreplaceability: Irreplaceability

Description

Irreplaceability scores can be used to assess the relative importance of planning units in a solution to a conservation planning problem.

Arguments

Details

The following methods are available for calculating irreplaceability scores:

replacement_cost

Calculate irreplaceability scores using the replacement cost method. This method is generally recommended for calculating irreplaceability scores.

rarity_weighted_richness

Calculate irreplaceability scores using rarity weighted richness. This method is only recommended for particularly large-scale conservation planning problems where the replacement cost method would take too long to produce scores in a feasible period of time.

See Also

problem.

Examples

Run this code
# NOT RUN {
# load data
data(sim_pu_raster, sim_pu_polygons, sim_features)

# build minimal conservation problem with raster data
p1 <- problem(sim_pu_raster, sim_features) %>%
      add_min_set_objective() %>%
      add_relative_targets(0.1) %>%
      add_binary_decisions() %>%
      add_default_solver(gap = 0, verbose = FALSE)

# solve the problem
# }
# NOT RUN {
s1 <- solve(p1)
# }
# NOT RUN {
# plot solution
# }
# NOT RUN {
plot(s1, main = "solution", axes = FALSE, box = FALSE)
# }
# NOT RUN {
# calculate irreplaceability scores using replacement cost scores
# }
# NOT RUN {
rc1 <- replacement_cost(p1, s1)
# }
# NOT RUN {
# calculate irreplaceability scores using rarity weighted richness scores
# }
# NOT RUN {
rc2 <- rarity_weighted_richness(p1, s1)
# }
# NOT RUN {
# plot irreplaceability scores
# }
# NOT RUN {
plot(stack(rc1, rc2), axes = FALSE, box = FALSE,
     main = c("replacement cost", "rarity weighted richness"))
# }

Run the code above in your browser using DataLab