Skip to contents

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

Usage

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

Arguments

species

Character. Species name (optional). When provided, returns groups 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_group objects. Each group has fields: id, name, description, and weights (named numeric vector keyed by objective id (e.g., obj_1), summing to 1.0). Pass these directly to sdm_scenario().

Examples

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

grps[[1]]$weights
#>  obj_1  obj_2  obj_3  obj_4  obj_5
#>   0.35   0.10   0.15   0.05   0.35
} # }