R/LW_competitive_ability.R

Defines functions LW_competitive_ability

LW_competitive_ability <- function(lambda, pair_matrix){
  if(lambda > 0 & all(pair_matrix >= 0)){
    log(lambda - 1)/sqrt(pair_matrix[1,1] * pair_matrix[1,2])
  }else{
    NA_real_
  }
}

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.