Learn R Programming

mastif (version 2.3)

mastPlot: Plot mast model

Description

Plots data fitted with mastif in package mastif.

Usage

mastPlot(output, plotPars = NULL)

Value

Currently, there are graphical outputs.

Arguments

output

list of class mast.

plotPars

list of inputs for plotting can include:

outFolder: if SAVEPLOTS = TRUE path to saved files.

SAVEPLOTS = FALSE: if TRUE writes plots to .pdf files.

trueValues: if passed from mastSim output then trueValues will be included in plots.

RMD: if set to "pdf" or "html" writes output to R markdown file in working directory.

Author

James S Clark, jimclark@duke.edu

Details

If SAVEPLOTS = TRUE plots are saved to files in outFolder. If RMD = "pdf", output is written to a R markdown file that can be edited and knitted. Maps are not included in this option. Otherwise, plots are rendered to the screen.

More detailed vignettes can be obtained with:

browseVignettes('mastif')

References

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, e01381.

See Also

mastSim simulates data

A more detailed vignette is can be obtained with:

browseVignettes('mast')

website 'http://sites.nicholas.duke.edu/clarklab/code/'.

Examples

Run this code
# \donttest{
# simulate data 
seedNames  <- specNames  <- 'acerRubr'
sim <- list(nyr=10, ntree=30, nplot=5, specNames = specNames, seedNames = seedNames)
inputs <- mastSim(sim)
output <- mastif( inputs = inputs, ng = 4000, burnin = 2000 )

# plot output 
# mastPlot( output, plotPars = list(trueValues = inputs$trueValues) )
# }

Run the code above in your browser using DataLab