Skip to contents

Fetches the standard objectives from the SDM API and returns them as ready-to-use sdm_objective objects. Pass species to get species-specific defaults instead of generic ones.

Usage

sdm_read_objectives(species = NULL, dry_run = FALSE, verbosity = 0)

Arguments

species

Character. Species name (optional). When provided, returns objectives tailored to that species (e.g., "moose", "mule_deer").

dry_run

Logical. If TRUE, return the request without sending.

verbosity

Integer. Verbosity level (0 = silent).

Value

A list of sdm_objective objects. Each objective has fields: id (e.g., "obj_1", assigned by sdm_scenario()), name, description, direction ("higher_is_better" or "lower_is_better"), range (length-2 numeric), and value_function (length-5 numeric). Pass these directly to sdm_scenario().

Examples

if (FALSE) { # \dontrun{
objs <- sdm_read_objectives(species = "moose")
objs[[1]]$name
#> [1] "Hunter Opportunity"

objs[[1]]$value_function
#> [1] 8 5 4 2 1
} # }