interactions: interactions

Description Usage Arguments Details Author(s) Examples

View source: R/interaction.R

Description

interactions creates an interactions matrix object defining the positive and negative interactions between populations. The interaction is not assumed symetrical, so a population can have a different effect on a population than this latest has on the first one. The interaction of a population on itself is equal to 0. The element [i,j] of the matrix is the effect of the population on the j column on the population of the i line.

Usage

1
2
interactions(nb_pop, x.interactions = rep(0, nb_pop * (nb_pop - 1)),
  labels = sprintf("Pop_%d", seq_len(nb_pop)), verbose = TRUE)

Arguments

nb_pop

is the number of populations in the model. The matrix interaction with only one population is set to 0.

x.interactions

is a vector of length nb_pop*(nb_pop-1) giving the interaction of each population on the other one. A positive value means a positive impact (facilitation) while a negative value means a negative impact (predation, competition). The vector starts with the vector of the interactions of the first population on the other ones (ranging from 2 to the last one, not including itself), and then the vector of the interactions of the second population on the others...

labels

is a vector of characters giving the labels of the populations.

verbose

Default is TRUE. Set to FALSE if you don't want the warnings.

Details

If no interaction vector is given, the default values are 0.

Author(s)

Nicolas BARTALUCCI <bartalucci.nico@gmail.com>

Examples

1
2
3
  interactions(nb_pop=3, x.interactions=c(0.2,-0.5, 0.1,0.2,0.3,0.8))
  interactions(nb_pop=2)
  interactions(nb_pop=1)

BEE-Univ-Grenoble/BeePODYNA documentation built on Dec. 25, 2019, 4:49 a.m.