coenoclinerutil: Utility Functions for 'coenocliner' Package

GradLocsR Documentation

Utility Functions for 'coenocliner' Package

Description

Functions to automated simulation routines using coenocliner package.

Usage

GradLocs(n, xrange, yrange)

GradMul(xy, xmul, ymul)

BinomGaussPar(nsp, xrange, yrange, buffer = 2, tsd = 0.1)

Gauss2betaPar(gausspar, shape = c(0.5, 6.5), cover = 0.95)

DropMissingSpec(comm)

coenorun1(sim, tot = 1, family = "binomial", far = 4, trace = TRUE)

Arguments

n

Number of SUs.

xrange, yrange

Desired range of gradients.

xy

Gradient locations in two dimensions.

xmul, ymul

Multipliers for each gradient

nsp

Number of species.

buffer

Width of buffer zone for optima surrounding ranges.

tsd

Standard deviation of tolerance in log-Normal distribution, in log scale

gausspar

Gaussian response parameters for species as returned by BinomGaussPar.

shape

Random log-uniform range of shape parameters alpha and gamma of response function

cover

Find range of beta response so that the same span covers the same proportion of 1-dim integral as the Gaussian response function.

comm

Community data.

sim

One simulated community.

tot

Binomial total in sim.

family

Error family passed to GO.

far

Weirdness limit passed to GO.

trace

Print tracing information. If FALSE or 0, work as silently as possible, and higher values print more.

Functions

  • GradLocs: Gradient Locations

  • GradMul: Multiply input gradient which presumably is a unit square

  • BinomGaussPar: Gaussian Parameters for Binomial Response.

  • Gauss2betaPar: Translate Gaussian parameters into corresponding beta response parameters.

  • DropMissingSpec: Drop missing species from the data.

  • coenorun1: Takes one simulated community for ordination with GO, NMDS, CA and DCA and returns average Procrustes precision

Author(s)

Jari Oksanen

Examples

require(coenocliner) || stop("examples need 'coenocliner' package")
## small simulation
nsim <- 10
npoints <- 50
## generate a set of species parameters over the maximum extent
sp <- replicate(nsim, BinomGaussPar(800, 8, 4))
## sample much narrower proportion of the space
xy <- replicate(nsim, GradLocs(npoints, 3, 2))
## Simulations: these can be easily parallelized using mclapply
## (Linux, Mac) or parSapply (all).
sapply(seq_len(nsim), function(i)
     coenorun1(coenocline(xy[,,i], "gaussian", sp[,i],
         countModel="bernoulli")))

jarioksa/GO documentation built on April 2, 2024, 8:37 p.m.