Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

targets

Add representation targets


Description

Targets are used to specify the minimum amount or proportion of a feature's distribution that should (ideally) be covered (represented) by a solution.

Details

Please note that most objectives require targets, and attempting to solve a problem that requires targets will throw an error.

The following functions can be used to specify targets for a conservation planning problem():

add_relative_targets()

Set targets as a proportion (between 0 and 1) of the total amount of each feature in the the study area.

add_absolute_targets()

Set targets that denote the minimum amount of each feature required in the prioritization.

add_loglinear_targets()

Set targets as a proportion (between 0 and 1) that are calculated using log-linear interpolation.

add_manual_targets()

Set targets manually.

See Also

Examples

# load data
data(sim_pu_raster, sim_features)

# create base problem
p <- problem(sim_pu_raster, sim_features) %>%
     add_min_set_objective() %>%
     add_binary_decisions() %>%
     add_default_solver(verbose = FALSE)

# create problem with added relative targets
p1 <- p %>% add_relative_targets(0.1)

# create problem with added absolute targets
p2 <- p %>% add_absolute_targets(3)

# create problem with added loglinear targets
p3 <- p %>% add_loglinear_targets(10, 0.9, 100, 0.2)

# create problem with manual targets that equate to 10% relative targets
p4 <- p %>% add_manual_targets(data.frame(feature = names(sim_features),
                                          target = 0.1,
                                          type = "relative"))
## Not run: 
# solve problem
s <- stack(solve(p1), solve(p2), solve(p3), solve(p4))

# plot solution
plot(s, axes = FALSE, box = FALSE,
     main = c("relative targets", "absolute targets", "loglinear targets",
              "manual targets"))

## End(Not run)

prioritizr

Systematic Conservation Prioritization in R

v7.0.1
GPL-3
Authors
Jeffrey O Hanson [aut] (<https://orcid.org/0000-0002-4716-6134>), Richard Schuster [aut, cre] (<https://orcid.org/0000-0003-3191-7869>), Nina Morrell [aut], Matthew Strimas-Mackey [aut] (<https://orcid.org/0000-0001-8929-7776>), Matthew E Watts [aut], Peter Arcese [aut] (<https://orcid.org/0000-0002-8097-482X>), Joseph Bennett [aut] (<https://orcid.org/0000-0002-3901-9513>), Hugh P Possingham [aut] (<https://orcid.org/0000-0001-7755-996X>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.