View source: R/mastifFunctions.R
| mastSim | R Documentation |
Simulates data for analysis by mastif in package mastif.
mastSim(sim)
sim |
|
The list sim contains the following:
specNames: character vector of species names.
seedNames: character vector of seed names.
nyr = 5: average number of years for a plot
ntree = 10: average number of trees in specNames on a plot
plotWide = 100: diameter of plot
nplot = 3: number of plots
ntrap = 20: average number of seed traps on a plot
meanDist = 25: mean dispersal (meters)
Returns an object of class "mastif", a list containing the following components:
distall |
|
distall |
seed trap by tree |
formulaFec |
|
formulaRep |
|
plots |
|
R |
species to seed type matrix. |
seedData |
|
seedNames |
|
sim |
inputs to |
specNames |
|
treeData |
|
trueValues |
|
xytrap |
|
xytree |
|
years |
|
James S Clark, jimclark@duke.edu
Clark, J.S., C. Nunes, and B. Tomasek. 2019. Foodwebs based on unreliable foundations: spatio-temporal masting merged with consumer movement, storage, and diet. Ecological Monographs, in press.
mastSim simulates data
A more detailed vignette is can be obtained with:
browseVignettes('mastif')
website 'http://sites.nicholas.duke.edu/clarklab/code/'.
# simulate data
seedNames <- specNames <- 'acerRubr'
sim <- list(nyr = 10, ntree = 30, nplot = 5, ntrap = 40,
specNames = specNames, seedNames = seedNames)
inputs <- mastSim(sim)
output <- mastif( inputs = inputs, ng = 500, burnin = 200 )
# increase iterations, then plot:
# output <- mastif( inputs = output, ng = 2000, burnin = 1000 )
# plot output
# mastPlot(output, plotPars = list(trueValues = inputs$trueValues) )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.