Description Usage Arguments Value See Also Examples

View source: R/calc_indicators.R

Calculates the Large Fish Indicator (LFI), Typical Length (TyL) or Length Quantile (LQ) for the community or a subset of the species.

1 2 3 4 5 |

`wgt` |
A matrix with dimensions |

`N` |
A matrix with dimensions |

`bry` |
A numeric vector representing the length classes that are larger than |

`prop` |
A numeric value between 0 and 1 representing how far along, as a proportion, the value of the large indicator threshold is in the length class that contains it. |

`u_bound` |
A numeric vector of length |

`prob` |
A numeric value or vector between 0 and 1 denoting the LQ to be calculated. |

`mid` |
A numeric vector of length |

`calc_LFI`

returns a numeric value or vector representing the proportion of the biomass in the length classes above `bry`

and in `prop`

of the biomass in the length class `bry`

.

`calc_TYL`

returns a numeric value or vector representing the biomass-weighted geometric mean length of the community.

`calc_LQ`

returns a numeric value or vector representing the length at which biomass exceeds a given proportion `prob`

of the total biomass.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ```
# Set up and run the model
NS_params <- LeMansParam(NS_par, tau=NS_tau, eta=rep(0.25, 21), L50=NS_par$Lmat, other=1e11)
effort <- matrix(0.5, 10, dim(NS_params@Qs)[3])
model_run <- run_LeMans(NS_params, years=10, effort=effort)
# Calculate the LFI for 40cm
bry <- which(NS_params@l_bound<=40 & NS_params@u_bound>40)
length_LFI <- 40
prop <- (length_LFI-NS_params@l_bound[bry])/(NS_params@u_bound[bry]-NS_params@l_bound[bry])
LFI <- calc_LFI(model_run@N[,,101], NS_params@wgt, bry, prop)
# Calculate TyL for the final time step
calc_TyL(wgt=NS_params@wgt, mid=NS_params@mid, N=model_run@N[,,101])
# Calculate the LQ for the final time step
calc_LQ(wgt=NS_params@wgt, u_bound=NS_params@u_bound, N=model_run@N[,,101], prob=0.5)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.