run_desc {gadget3}R Documentation

Gadget3 actions into R code

Description

Convert g3 actions into a character vector describing the model

Usage

g3_to_desc(actions, minor_steps = FALSE)

Arguments

actions

A list of actions (i.e. list of formula objects), as produced by g3a_* functions.

minor_steps

Include minor steps (e.g. zeroing cumulative arrays)? TRUE / FALSE

Value

Character vector describing each step in the model. An action in a model may have generated multiple steps (e.g. select each prey stock, scale total amount, apply overstocking), and there will be a line in here for each.

Examples


ling_imm <- g3_stock('ling_imm', seq(20, 156, 4)) %>% g3s_age(3, 10)

initialconditions_action <- g3a_initialconditions_normalparam(
    ling_imm,
    by_age = TRUE)

# Timekeeping action
time_action <- g3a_time(
    start_year = 2000,
    end_year = 2004,
    c(3, 3, 3, 3))

# Generate a list outlining the steps the model uses
as.list(g3_to_desc(list(initialconditions_action, time_action)))

[Package gadget3 version 0.11-1 Index]