Description Usage Arguments Value Author(s) See Also Examples
Function generates pdfs (probability density functions) corresponding to chosen sizes and adds them to a figure using growth methods.
1 2 3 4 5 6 7 8 9 | addPdfGrowthPic(respType = "sizeNext", sizesPlotAt = c(20, 50, 60),
sizeRange = c(20, 400), incrRange = c(-10, 50),
scalar = 100, growthObjList,
cols = 1:5,
cov = data.frame(covariate=1),
minShow = 1e-2,
jitt = 2,
...)
|
respType |
character string identifying the response variable for the growthModelComp. wither |
sizesPlotAt |
vector, list of sizes at which pdfs should be plotted. |
sizeRange |
sizeRange for which pdf should be estimated |
incrRange |
increment range for which pdf should be estimated |
scalar |
value by which pdf may be multiplied to improve visibility |
growthObjList |
list of growth objects for which pdfs are desired to be plotted |
cols |
colours corresponding to the list of growth objects for plotting |
cov |
a data-frame with one row containing all covariates other than size related covariates; defaults to 1; will be ignored if no covariates are fitted |
minShow |
minimum value below which pdf lines will not be shown (to avoid ugly vertical lines) |
jitt |
amount by which sequential pdfs should be separated on the x axis, for visibility |
... |
extra arguments to pass to the plot function. |
none
C. Jessica E. Metcalf, Sean M. McMahon, Roberto Salguero-Gomez, Eelke Jongejans & Cory Merow.
makeGrowthObj
,makeSurvObj
,plotGrowthModelComp
, plotSurvModelComp
1 2 3 4 5 6 7 8 | # Data with size and sizeNext
dff <- generateData()
a1 <- growthModelComp(dff, makePlot = TRUE)
addPdfGrowthPic(respType = "sizeNext",
sizesPlotAt = c(2, 6, 10), scalar = 1, jitt = 0.1,
sizeRange = c(-5, 25),
growthObjList = a1$growthObjects, cols = 2:5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.