R/niche_overlap_MCT.R

Defines functions niche_overlap_MCT

#' niche overlap function for a suite of models (LV,RK,LW,BH)
#'
#' formulation from the modern coexistence theory (e.g. Chesson 2012)
#'
#' @param pair_matrix pairwise interaction matrix
#'
#' @return numeric value
#' @noRd
#'
#' @examples niche_overlap_MCT(matrix(c(.1,.2,.03,.3),nrow = 2))
niche_overlap_MCT <- function(pair_matrix){
  sqrt((pair_matrix[1,2]/pair_matrix[2,2])*(pair_matrix[2,1]/pair_matrix[1,1]))
}

Try the cxr package in your browser

Any scripts or data that you put into this service are public.

cxr documentation built on Oct. 27, 2023, 1:08 a.m.