dff <- generateData()
Pmatrix <- createIPMPmatrix(minSize = min(dff$size, na.rm=TRUE),
maxSize = max(dff$size, na.rm = TRUE), growObj = makeGrowthObj(dff),
survObj = makeSurvObj(dff))
Fmatrix <- createIPMFmatrix(minSize = min(dff$size, na.rm = TRUE),
maxSize = max(dff$size, na.rm = TRUE), fecObj = makeFecObj(dff))
IPM <- Pmatrix + Fmatrix
#Plot P matrix contour plot
minSize <- 0
maxSize <- max(Pmatrix)
contourPlot(Pmatrix, Pmatrix@meshpoints, minSize, maxSize, heat.colors)
#Plot F matrix contour plot
minSize <- 0
maxSize <- max(Fmatrix)
contourPlot(Fmatrix, Fmatrix@meshpoints, minSize, maxSize, heat.colors)
#Plot IPM contour plot
contourPlot(IPM, Pmatrix@meshpoints, minSize, maxSize, heat.colors)
#Plot IPM sensitivity contour plot
senIPM <- sens(IPM)
minSize <- 0
maxSize <- max(senIPM)
contourPlot(senIPM, Pmatrix@meshpoints, minSize, maxSize, heat.colors)
#Plot IPM elasticity contour plot
elaIPM <- elas(IPM)
minSize <- 0
maxSize <- max(elaIPM)
contourPlot(senIPM, Pmatrix@meshpoints, minSize, maxSize, heat.colors)
Run the code above in your browser using DataLab