From 6020534f70ba6e4ec74dcdda54ec37e333d3dfdf Mon Sep 17 00:00:00 2001 From: sokole Date: Tue, 29 Mar 2016 19:02:04 -0600 Subject: [PATCH] re compile documentation --- man/as.count.Rd | 30 ++++++++++++++ man/fisher.ecosystem.Rd | 37 +++++++++++++++++ man/fn.lambda.Rd | 34 ++++++++++++++++ man/fn.lottery.recruit.Rd | 24 +++++++++++ man/fn.make.landscape.Rd | 40 +++++++++++++++++++ man/fn.metaSIM.Rd | 51 ++++++++++++++++++++++++ man/fn.recruit.Jt.Rd | 62 +++++++++++++++++++++++++++++ man/fn.set.regional.species.pool.Rd | 50 +++++++++++++++++++++++ 8 files changed, 328 insertions(+) create mode 100644 man/as.count.Rd create mode 100644 man/fisher.ecosystem.Rd create mode 100644 man/fn.lambda.Rd create mode 100644 man/fn.lottery.recruit.Rd create mode 100644 man/fn.make.landscape.Rd create mode 100644 man/fn.metaSIM.Rd create mode 100644 man/fn.recruit.Jt.Rd create mode 100644 man/fn.set.regional.species.pool.Rd diff --git a/man/as.count.Rd b/man/as.count.Rd new file mode 100644 index 0000000..a6884c8 --- /dev/null +++ b/man/as.count.Rd @@ -0,0 +1,30 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/functions_untb.R +\name{as.count} +\alias{as.count} +\title{count} +\usage{ +as.count(a, add = "") +} +\arguments{ +\item{a}{species count data, see \link[untb]{count} documentation} + +\item{add}{see \link[untb]{count} documentation} +} +\description{ +Function from the \pkg{untb} package, see \link[untb]{count}, +used for internal calculations in \link{fn.metaSIM}. +} +\details{ +count +} +\references{ +Hankin, R. K. 2007. Introducing untb, an R package for simulating +ecological drift under the unified neutral theory of biodiversity. Journal of +Statistical Software 22:1--15. +\url{http://cran.r-project.org/web/packages/untb/index.html} +} +\seealso{ +\code{\link[untb]{count}} +} + diff --git a/man/fisher.ecosystem.Rd b/man/fisher.ecosystem.Rd new file mode 100644 index 0000000..04099da --- /dev/null +++ b/man/fisher.ecosystem.Rd @@ -0,0 +1,37 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/functions_untb.R +\name{fisher.ecosystem} +\alias{fisher.ecosystem} +\title{fisher.ecosystem} +\usage{ +fisher.ecosystem(N, S, nmax, alpha = 2, c = 0) +} +\arguments{ +\item{N}{Number of individuals} + +\item{S}{Number of species} + +\item{nmax}{Max number of species abundance classes} + +\item{alpha}{Fisher's alpha. If not supplied it will be calculated from \code{N} and \code{S}} + +\item{c}{Rare species advantage term} +} +\description{ +Function from the \pkg{untb} package, +see \link[untb]{fisher.ecosystem} -- used for internal +calculations in \link{fn.metaSIM}. +} +\details{ +fisher.ecosystem +} +\references{ +Hankin, R. K. 2007. Introducing untb, an R package for simulating +ecological drift under the unified neutral theory of biodiversity. Journal of +Statistical Software 22:1--15. +\url{http://cran.r-project.org/web/packages/untb/index.html} +} +\seealso{ +\code{\link[untb]{fisher.ecosystem}} +} + diff --git a/man/fn.lambda.Rd b/man/fn.lambda.Rd new file mode 100644 index 0000000..ea4b87b --- /dev/null +++ b/man/fn.lambda.Rd @@ -0,0 +1,34 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/functions_MCSim_0_3_release.R +\name{fn.lambda} +\alias{fn.lambda} +\title{Calculate recruitment bias based on environmental filtering} +\usage{ +fn.lambda(trait.optimum, niche.breadth, Ef, Ef.specificity) +} +\arguments{ +\item{trait.optimum}{Optimum value for a given species along an environmental +gradient. Gradients in \link{fn.metaSIM} are restricted to the range [0,1], so +this value must be in the range [0,1].} + +\item{niche.breadth}{Niche breadth around a species' trait optimum. The value of sigma +in Fig 1 in Gravel et al. (2006).} + +\item{Ef}{Value of the environmental filter at the site for which lambda is being +calculated.} + +\item{Ef.specificity}{The selection specificity of the environmental filter.} +} +\description{ +Used by \link{fn.metaSIM}. Uses niche breadth and an +environmental gradient to determine how to bias species selection +weights based on environmental filtering dynamics. See Gravel et al. 2006. +} +\details{ +fn.lambda +} +\references{ +Gravel, D., C. D. Canham, M. Beaudet, and C. Messier. 2006. Reconciling niche and +neutrality: the continuum hypothesis. Ecology Letters 9:399--409. +} + diff --git a/man/fn.lottery.recruit.Rd b/man/fn.lottery.recruit.Rd new file mode 100644 index 0000000..0b9c809 --- /dev/null +++ b/man/fn.lottery.recruit.Rd @@ -0,0 +1,24 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/functions_MCSim_0_3_release.R +\name{fn.lottery.recruit} +\alias{fn.lottery.recruit} +\title{Lottery recruitment} +\usage{ +fn.lottery.recruit(vect.recruitment.weights, vect.taxa.list, scalar.JL) +} +\arguments{ +\item{vect.recruitment.weights}{A vector of recruitment weights.} + +\item{vect.taxa.list}{A vector of characters (or character strings) that is a +list of species names.} + +\item{scalar.JL}{Size of the assemblage (i.e., number of individuals to recruit).} +} +\description{ +Lottery recruitment function for a single assemblage used +by \link{fn.metaSIM}. +} +\details{ +fn.lottery.recruit +} + diff --git a/man/fn.make.landscape.Rd b/man/fn.make.landscape.Rd new file mode 100644 index 0000000..ba1f818 --- /dev/null +++ b/man/fn.make.landscape.Rd @@ -0,0 +1,40 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/functions_MCSim_0_4_1_9002.R +\name{fn.make.landscape} +\alias{fn.make.landscape} +\title{make a simulation landscape} +\usage{ +fn.make.landscape(site.coords = c(1:10), dist.mat = data.frame(), + site.info = data.frame(), JL = NULL, JM = NULL, m = NULL, + I.rate.m2 = NULL, area.m2 = 1, Ef.specificity = 0, Ef = 0, + guess.site.coords = FALSE, list.of.stuff = NA, ...) +} +\arguments{ +\item{site.coords}{A data.frame of site coordinates. Can be 1, 2, or more dimensions} + +\item{dist.mat}{Alternative to site.coords. Can be a distance matrix or a network map from the igraph package} + +\item{site.info}{A data frame with site information} + +\item{JL}{Scalar or vector number of individuals at each site, overrides JM} + +\item{JM}{Total number of individuals to include in a MCSim simulation.} + +\item{m}{Immigration rate paramter, from Hubbells neutral model. Overrides I.rate.m2.} + +\item{I.rate.m2}{Alternative to m, immigration rate in number of individuals / m2 / timestep. Default is 1.} + +\item{area.m2}{Area of each site in m2. Default is 1.} + +\item{Ef.specificity}{Vector of specificity values for environmental filters at each site. If 0 (default), site habitat value is modeled as a single point along an environmental gradient. If > 0, a site's habitat is modeled as a normal curve around a point on an environmental gradient.} + +\item{Ef}{Vector of habitat scores for each site.} + +\item{guess.site.coords}{Binary. If TRUE, Uses PCoA to extract site coordinates if given a distance matrix or network map. Useful to make a map to display sites. Not necessary if igraph input is used because igraph has a function to plot a network map. Default is FALSE.} + +\item{list.of.stuff}{A list that can be used to store other landscape attributes in the landscape object. Useful for storing igraph properties when igraph is used.} +} +\description{ +fn.make.landscape +} + diff --git a/man/fn.metaSIM.Rd b/man/fn.metaSIM.Rd new file mode 100644 index 0000000..8cdb187 --- /dev/null +++ b/man/fn.metaSIM.Rd @@ -0,0 +1,51 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/functions_MCSim_0_4_1_9002.R +\name{fn.metaSIM} +\alias{fn.metaSIM} +\title{A metacommunity simulation for ecologists} +\usage{ +fn.metaSIM(landscape) +} +\arguments{ +\item{landscape}{Landscape object created by function fn.make.landscape()} + +\item{scenario.ID}{A name for the simulation scenario. All simulations with the same scenario name will have metadata collated in a single .csv file. Default is NA} + +\item{sim.ID}{A name for this particular simulation. Default will provide a random ID.} + +\item{alpha.fisher}{User can use Fisher's alpha to seed a simulation's initial regional source pool.} + +\item{nu}{Probability a novel species will appear in a single recruitment event} + +\item{speciation.limit}{Set's a limit on the number of novel taxa that can appear in a simulation} + +\item{JM.limit}{set's an upper limit for the number of individuals in a simulation} + +\item{n.timestep}{Number of generations in a simulation} + +\item{W.r}{Dispersal kernel slope} + +\item{save.sim}{Binary, will save the simulation as a .rda file if TRUE. Default is FALSE.} + +\item{output.dir.path}{Name of directory to save simulation results and metadata. Default is "SIM_OUTPUT". Simulation will create a sub-directory in the working directory if none exists.} + +\item{trait.dispersal}{Vector of dispersal traits. Default is NULL} + +\item{trait.dispersal.median}{Scalar value for dispersal applied to all species if no vector is provided. Default is 1.} + +\item{trait.dispersal.range}{Range of dispersal values given to species if dispersal traits are randomly assigned.} + +\item{trait.Ef}{Vector of species' niche positions} + +\item{trait.Ef.sd}{Vector of species' niche breadths} + +\item{gamma.abund}{Vector of regional abundances, can be used to seed a simulation} + +\item{J.t0}{Site by species data.table or matrix that can be used to seed a simulation} + +\item{taxa.list}{A character vector of names for species} +} +\description{ +fn.metaSIM +} + diff --git a/man/fn.recruit.Jt.Rd b/man/fn.recruit.Jt.Rd new file mode 100644 index 0000000..683efd8 --- /dev/null +++ b/man/fn.recruit.Jt.Rd @@ -0,0 +1,62 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/functions_MCSim_0_4_1_9002.R +\name{fn.recruit.Jt} +\alias{fn.recruit.Jt} +\title{Recruitment in a metacommunity with context} +\usage{ +fn.recruit.Jt(landscape.site.coords = landscape$dat[, c("x", "y")], nu = nu, + SWM.slope = SWM.slope, J.t.minus.1 = J.t.minus.1, + taxa.list = taxa.list, traits.Ef = dat.gamma.t0$trait.Ef, + trait.Ef.sd = trait.Ef.sd, traits.dispersal = dat.gamma.t0$trait.dispersal, + landscape.m = landscape$dat$m, landscape.Ef = landscape$dat$Ef, + landscape.Ef.specificity = landscape$dat$Ef.specificity, + landscape.JL = landscape$dat$JL) +} +\arguments{ +\item{nu}{Numeric, Hubbell's "speciation rate", but can be interpreted as the +probability of the appearance of a novel species. If set to 0, no novel taxa +will appear during the simulation.} + +\item{SWM.slope}{Slope of dispersal kernel, see \link{fn.metaSIM}. This value +is used for \code{w} in eqn. 6 from Gravel et al. (2006) to model dispersal +limitation.} + +\item{J.t.minus.1}{Species composition of sites in a metacommunity at previous +time step.} + +\item{taxa.list}{A vector of character strings of species' names.} + +\item{traits.Ef}{A vector of species' trait scores, numeric.} + +\item{trait.Ef.sd}{A scalar value representing species' niche widths (numeric, +currently one value is used for all species).} + +\item{traits.dispersal}{A vector of species' dispersal trait scores.} + +\item{landscape.site.coords}{A data.frame with xy-coordinates for each site. Each row is a +site in the metacommunity landscape.} + +\item{landscape.m}{A vector of values for \code{m} for each site in the landscape.} + +\item{landscape.Ef}{A vector of environmental filter \code{Ef} values for each site +in the landscape.} + +\item{landscape.Ef.specificity}{Environmental specificity at each site (numeric).} + +\item{landscape.JL}{A vector of assemblage sizes (positive integers) for all sites +in the landscape.} +} +\description{ +Internal function called by \link{fn.metaSIM} to calculate local +recruitment pools for all sites in a metacommunity, and call \link{fn.lottery.recruit} +to create a new assemblages (J) at time (t) after accounting for metacommunity +composition at time (t-1), dispersal dynamics, landscape topology, and environmental +filtering. +} +\details{ +fn.recruit.Jt +} +\seealso{ +\link{fn.lottery.recruit}, \link{fn.make.landscape}, \link{fn.metaSIM} +} + diff --git a/man/fn.set.regional.species.pool.Rd b/man/fn.set.regional.species.pool.Rd new file mode 100644 index 0000000..16e2ab2 --- /dev/null +++ b/man/fn.set.regional.species.pool.Rd @@ -0,0 +1,50 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/functions_MCSim_0_4_1_9002.R +\name{fn.set.regional.species.pool} +\alias{fn.set.regional.species.pool} +\title{Initialize species pool for fn.metaSIM} +\usage{ +fn.set.regional.species.pool(alpha.fisher = 1) +fn.set.regional.species.pool(gamma.abund = c(.9, .4, .2, .3)) +} +\arguments{ +\item{alpha.fisher}{Fisher's alpha used to initiate the simulation.} + +\item{n.timestep}{Number of generations (time steps) in the simulation, can affect number of novel species. Default is 0.} + +\item{nu}{Scalar value representing the probability that a novel species +is recruited. Hubbell's \dQuote{speciation rate}.} + +\item{speciation.limit}{A limit to the number of novel species that can occur +in the simulation, default is 0.} + +\item{JM}{Total number of individuals in the metacommunity.} + +\item{gamma.abund}{Vector of relative abundances or counts used to set regional species pool RAs} + +\item{trait.dispersal}{Vector of trait scores for dispersal, should be in range 0 to 1, or NULL} + +\item{trait.dispersal.median}{Median value for species' dispersal trait values.} + +\item{trait.dispersal.range}{Range in variation allowed for species' trait +dispersal values.} + +\item{Ef.min}{Min limit for environmental gradient} + +\item{Ef.max}{Max limit for environmental gradient} + +\item{trait.Ef}{Vector or value of niche positions for species in regional pool} + +\item{trait.Ef.sd}{Vector or value of niche breadths} + +\item{taxa.list.prefix}{A character string to use as a prefix in species' names.} + +\item{taxa.list.prefix}{Text appended as prefix to species names to prevent errors for column names when site by species matrices are created. Default is "spp".} +} +\description{ +Initialize species pool for fn.metaSIM +} +\details{ +fn.set.regional.species.pool +} +