Skip to contents

Setup fish population for model run.

Usage

setup_fishpop(
  seafloor,
  starting_values,
  parameters,
  use_log = TRUE,
  verbose = TRUE
)

Arguments

seafloor

Data.frame object.

starting_values

List with all starting value parameters.

parameters

List with all model parameters.

use_log

Logical if TRUE, random log distribution is used.

verbose

Logical if TRUE, information is printed.

Value

data.frame

Details

Function to setup the fish population. If use_log = TRUE the size distribution of the fish population follows a log-norm distribution. For more information, see calc_size (internal function). To create no fish, set starting_values$pop_n = 0.

Examples

reef <- matrix(data = c(-1, 0, 0, 1, 1, 0, 0, -1, 0, 0),
ncol = 2, byrow = TRUE)

seafloor <- setup_seafloor(dimensions = c(50, 50), grain = 1,
reef = reef, starting_values = default_starting)
#> > ...Creating seafloor with 50 rows x 50 cols...
#> > ...Creating 5 artifical reef cell(s)...
fishpop <- setup_fishpop(seafloor = seafloor,
starting_values = default_starting, parameters = default_parameters)
#> > ...Creating 8 individuals within -25 25 -25 25 (xmin, xmax, ymin, max)...