build_metaweb: Metaweb building

Description Usage Arguments Details Value

View source: R/metaweb_build.R

Description

Metaweb building

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
build_metaweb(
  data,
  species,
  size,
  pred_win,
  beta_min,
  beta_max,
  fish_diet_shift,
  low_bound,
  upper_bound,
  fish,
  resource_diet_shift,
  class_method = "quantile",
  nb_class = 9,
  pred_win_method = "midpoint",
  na.rm = FALSE,
  replace_min_by_one = FALSE,
  fish_resource_method = "overlap"
)

Arguments

data

a dataframe containing species and size variable

species

blabla

size

data.frame containing species and length.

pred_win

data.frame containing species and the predation window parameters (\alpha and \beta).

beta_min

column name containing beta_min parameters

beta_max

column name contains beta_max parameters

class_method

character percentile or quantile. Default to percentile.

nb_class

integer number of size class to create. Default to 9.

pred_win_method

character midpoint, overlap or no_overlap. Default to midpoint.

na.rm

logical. Should the NAs be removed ?

replace_min_by_one

logical. In the first class, replace low bound by 1.

fish_resource_method

character Either "overlap", "willem" or "midpoint"

diet_shift

data.frame containing species and the predation window.

Details

class_method = "quantile" use the quantile function to create size class in nb_class . When class_method = "percentile", the range of the size distribution is divided by nb_class. The difference is that quantile start the first class at the minimum value of the size distribution while percentile begins at 0. It therefore gives slightly different results. When the predation window definition is defined as overlap or midpoint, there will be possibility of overlap between size class of a predator and a prey. It means that for trophic link established between a prey and a predator, the smallest predator of a given size class is smaller than the biggest prey fish. When pred_win_method is set to "no_overlap", the upper limit of the predation window of a predator size class is defined by the smallest predator of the size class, so there is no overlap between predator and prey. With midpoint option, the existence of a trophic link is defined by the middle of the predator size class.

Value

matrix


alaindanet/SizeTrophicInteractions documentation built on Dec. 18, 2021, 11:32 p.m.