dispersal: perform dispersal analysis for each simulation time step for...

Description Usage Arguments Details Author(s) References See Also Examples

View source: R/coexist.R

Description

this function is used to characterize species' dispersal across the patches for each time step

Usage

1
dispersal(spvector, initp,dismat, allee = 1)

Arguments

spvector

species-patch abundance matrix prior to dispersal in this time step

initp

initial population size for a species that will be released at the source patch at each time step

dismat

a dispersal matrix, or connectivity matrix among the patches (i.e., matrix is the same for all species). Different from flex.dispersal() function, which is a list of matrices, and allowed different species will have different dispersal rates across patches

allee

allee effect for the species, the minimum viable population in a local patch, default=1, indicating that if the population size in a patch for a species is less than 1, then the species will be removed from that patch

Details

return an updated species-patch abundance matrix at next time step

Author(s)

Youhua Chen <yhchen@zoology.ubc.ca>

References

Chen YH (2012) coexist: an R package for performing species coexistence modeling and analysis under asymmetric dispersal and fluctuating source-sink dynamics. http://code.google.com/p/coexist.

See Also

flex.dispersal, competition

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (spvector, initp, dismat, allee = 1) 
{
    spvector <- spvector %*% dismat
    spvector[1, 1] = initp
    spvector[2, 1] = initp
    spvector[which(spvector < allee)] = 0
    return(spvector)
  }

coexist documentation built on May 2, 2019, 1:43 p.m.