knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
library(knitr)
library(kableExtra)

Please see vignette("general-background") for a general overview of arrR. For a quick tutorial of how to use arrR, please see vignette("get-started").

To see a full list all needed starting values and parameters, simply run check_parameters(). Both starting values and parameters must be provided as a named lists. The package contains a set of default values you can easily access (default_parameters, default_starting).

Starting values

starting_values_df <- data.frame(

  name = c(

    # biomass 
    "bg_biomass", 
    "ag_biomass", 

    # nutrients/detritus
    "nutrients_pool", 
    "detritus_pool", 

    # fishpop related
    "pop_n", 
    "pop_mean_size", 
    "pop_sd_size"), 

  fun = c(

    # biomass 
    "setup_seafloor()", 
    "setup_seafloor()", 

    "setup_seafloor()",
    "setup_seafloor()", 

    "setup_fishpop()", 
    "setup_fishpop()", 
    "setup_fishpop()"), 

  descr = c(

    # biomass 
    "Starting belowground biomass", 
    "Starting aboveground biomass", 

    # nutrients/detritus                                       
    "Starting nutrients pool", 
    "Starting detritus biomass", 

    # fishpop related                                     
    "Number of fish individuals", 
    "Mean fish individual size", 
    "Standard deviation fish individual size"))

knitr::kable(starting_values_df, col.names = c("Name", "Function", "Describtion"), align = "lrr") %>% 
  kableExtra::kable_styling(full_width = TRUE, position = "center", font_size = 12, )

Parameters

parameter_df <- data.frame(

  name = c(

    # bg_*
    "bg_biomass_min", 
    "bg_biomass_max", 
    "bg_v_max", 
    "bg_k_m", 
    "bg_gamma", 

    # ag_*
    "ag_biomass_min", 
    "ag_biomass_max", 
    "ag_v_max", 
    "ag_k_m",
    "ag_gamma",

    # seagrass_*
    "seagrass_thres",
    "seagrass_slope",
    "seagrass_slough",

    # nutrients_*
    "nutrients_diffusion", 
    "nutrients_loss", 

    # detritus_*
    "detritus_mineralization",
    "detritus_diffusion",
    "detritus_fish_decomp",
    "detritus_fish_diffusion",
    "detritus_loss",

    # move_* 
    "move_mean",
    "move_sd",
    "move_border",
    "move_reef",
    "move_return",

    # pop_reserves_*
    "pop_reserves_max",
    "pop_reserves_thres_lo",
    "pop_reserves_thres_hi",
    "pop_reserves_consump",

    # pop_*
    "pop_a",
    "pop_b",
    "pop_k",
    "pop_linf",
    "pop_n_body",

    # resp_*
    "resp_intercept", 
    "resp_slope", 
    "resp_temp_low", 
    "resp_temp_optm", 
    "resp_temp_max"), 

  fun = c(

     # bg_*      
    "rcpp_seagrass_growth()", 
    "rcpp_seagrass_growth()", 
    "rcpp_seagrass_growth()", 
    "rcpp_seagrass_growth()",
    "rcpp_seagrass_growth()",

     # ag_*
    "rcpp_seagrass_growth()", 
    "rcpp_seagrass_growth()", 
    "rcpp_seagrass_growth()", 
    "rcpp_seagrass_growth()",
    "rcpp_seagrass_growth()", 

    # seagrass_*  
    "rcpp_seagrass_growth()", 
    "rcpp_seagrass_growth()",
    "rcpp_seagrass_growth()",

     # nutrients_*      
    "rcpp_diffuse_values()",
    "rcpp_nutr_output()",

    # detritus_*
    "rcpp_mineralization()",
    "rcpp_diffuse_values()",
    "rcpp_mineralization()",
    "rcpp_diffuse_values()",
    "rcpp_nutr_output()",

    # move_* 
    "rcpp_move_rand(), rcpp_move_behav()",
    "rcpp_move_rand()",
    "rcpp_move_behav()",
    "rcpp_move_behav()",
    "rcpp_move_behav()",

    # pop_reserves_*
    "rcpp_fishpop_growth(), rcpp_mortality()",
    "run_simulation()",
    "run_simulation()",
    "rcpp_fishpop_growth()",

    # pop_*
    "rcpp_fishpop_growth()",
    "rcpp_fishpop_growth()",
    "rcpp_fishpop_growth()",
    "rcpp_fishpop_growth(), rcpp_mortality()",
    "rcpp_fishpop_growth(), rcpp_mortality()",

    # resp_*
    "rcpp_respiration()", 
    "rcpp_respiration()", 
    "rcpp_respiration()", 
    "rcpp_respiration()", 
    "rcpp_respiration()"),

  descr = c(

    # bg_*
    "Minimum belowground biomass", 
    "Maximum belowground biomass", 
    "Maximum belowground uptake rate", 
    "Half-saturation belowground nutrient uptake",
    "Nutrient content percent per dry weight belowground biomass",

    # ag_*
    "Minimum aboveground biomass", 
    "Maximum aboveground biomass", 
    "Maximum aboveground uptake rate", 
    "Half-saturation aboveground nutrient uptake",
    "Nutrient content percent per dry weight aboveground biomass",

    # seagrass_*
    "Midpoint or threshold of allocation function",
    "Slope of allocation function",
    "Sloughed fraction of biomass",

    # nutrients_*
    "Fraction of nutrients that is diffused across neighboring cells", 
    "Fraction of nutrients that exits the system each timestep", 

    # detritus_*
    "Fraction of detrital biomass that is mineralized",
    "Fraction of detrital biomass that is diffused across neighboring cells",
    "Fraction of fish detrital biomass that is decomposited",
    "Fraction of fish detrital biomass that is diffused across neighboring cells",
     "Fraction of detritus pool that exits the system each timestep", 

    # move_* 
    "Mean movement distance",
    "Standard deviation of movement distance",
    "Distance to the AR until individuals are considered to be at the AR",
    "Movement distance directly at the AR",
    "Movement distance for returning to the AR",

    # pop_reserves_*
    "Fraction of total biomass that individuals can store as reserves",
    "Lower boundary of reservers at which individuals leave AR to forage",
    "Upper boundary of reservers at which individuals leave AR to forage",
    "Fraction of reserves that individuals can consume each timestep",

    # pop_*
    "Length-weight relationship",
    "Length-weight relationship",
    "Growth coefficient",
    "Maximum body length",
    "Nutrient ratio of individual body mass ",

    # resp_*
    "Intercept of respiration function", 
    "Slope of respiration function", 
    "Low water temperature for respiration", 
    "Optimum water temperature for respiration", 
    "Maximum water temperature for respiration"))

knitr::kable(parameter_df, col.names = c("Name", "Function", "Describtion"), align = "lrr") %>% 
  kableExtra::kable_styling(full_width = TRUE, position = "center", font_size = 12, )


Allgeier-Lab/arrR documentation built on Feb. 13, 2025, 7:44 a.m.