decode.statevarnames: Decode the streambugs ODE state variable names

View source: R/streambugs_aux.r

decode.statevarnamesR Documentation

Decode the streambugs ODE state variable names

Description

Extract reach names, habitat names, taxa names and optional group names from encoded labels of streambugs ODE state variable names.

Usage

decode.statevarnames(y.names)

Arguments

y.names

vector with state variable names in the form of "Reach_Habitat_Taxon" or "Reach_Habitat_Taxon_Group"

Value

List with:

$y.names

names of state variables (input argument)

$y.reaches, $y.reaches, $y.habitats, $y.taxa, and $y.groups:

Names of, respectively, reaches, habitats, taxa, and of groups of each state variable

$reaches, $habitats, $taxa, $groups:

Unique names of, respectively, reaches, habitats, taxa, and of groups of state variables

$ind.fA:

Indices used for the areal fractions of each reach and habitat

Examples

y.names <- c("Reach1_Hab1_Baetis_Invertebrates","Reach1_Hab1_Ecdyonurus_Invertebrates",
             "Reach2_Hab1_Baetis_Invertebrates", "Reach2_Hab1_Ecdyonurus_Invertebrates")
decode.statevarnames(y.names)


streambugs documentation built on Feb. 16, 2023, 9:48 p.m.