R/RcppExports.R

Defines functions calc_M2_c

Documented in calc_M2_c

# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

#' Calculates predation mortality, M2 (C++)
#'
#' Calculates the predation mortality for each species in each size class
#'
#'@param nSize Number of size class intervals species can grow through
#'@param nSpecies Number of species in the model
#'@param N A matrix (nSize x nSpecies) of abundance (number of individuals)
#'@param scLinf A vector (nSpecies) of the size class at which each species reaches L_inf (maximum length)
#'@param ration A matrix (nSize x nSpecies) of (growth in time interval)/growth efficiency values. See \code{\link{calc_ration}}
#'@param wgt A matrix (nSize x nSpecies) of species weight at the mid point of each size class (Units: grams). See \code{\link{calc_ration}}
#'@param suitability 3D array of predator size preference for prey size. See \code{\link{calc_sizepref_suitability}}
#'@param phiMin Scalar. Model timestep (years). See \code{\link{calc_phi}}
#'@param otherFood Scalar. Amount of other food available not accounted for in the model (g)
#'
#'@return A matrix is returned
#'
#'   \item{M2}{A matrix (nSize x nSpecies) of M2 (predation mortality) values.
#'    Note: M2 = 0 for size classes in which a species is not preyed upon.}
#'
#'@seealso \code{\link{calc_sizepref_suitability}}, \code{\link{calc_ration}} \code{\link{calc_phi}}
#'@section References:
#'Hall et al. (2006). A length-based multispecies model for evaluating community responses to fishing. Can. J. Fish. Aquat. Sci. 63:1344-1359.
#'
#'Rochet et al. (2011). Does selective fishing conserve community biodiversity? Prediction from a length-based multispecies model. Can. J. Fish. Aquat. Sci. 68:469-486
#'alc_
#' @export
calc_M2_c <- function(nSize, nSpecies, N, scLinf, ration, wgt, suitability, phiMin, otherFood) {
    .Call('_LeMANS_calc_M2_c', PACKAGE = 'LeMANS', nSize, nSpecies, N, scLinf, ration, wgt, suitability, phiMin, otherFood)
}
NOAA-EDAB/LeMANS documentation built on Feb. 7, 2021, 11:01 p.m.