rcpp_reincarnate: rcpp_reincarnate

View source: R/RcppExports.R

rcpp_reincarnateR Documentation

rcpp_reincarnate

Description

Rcpp reincarnate fish indivudals.

Usage

rcpp_reincarnate(
  fishpop,
  fishpop_track,
  fish_id,
  seafloor,
  extent,
  dimensions,
  pop_n_body,
  reason
)

Arguments

fishpop, fishpop_track

Matrix with fishpop and starting fishpop values.

fish_id

Vector with id of fish and corresponding cell ids.

seafloor

Matrix with seafloor values.

extent

Vector with extent (xmin,xmax,ymin,ymax).

dimensions

Vector with dimensions (nrow, ncol).

pop_n_body

Nutrient content of body mass.

reason

String with reason of reincarnation.

Details

Creates a new individual after mortality event. The new individual has the same values as the died individual at the beginning of the simulation.

The mass difference (i.e. current mass minus mass at time step zero) and the reserves of the died individual are added to the detritus pool. The reincarnated individual tries to fill its reserves from the detritus pool if enough nutrients are available.

Value

void


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