dshm_plot: Plotting prediction grid

Description Usage Arguments Details Value Author(s)

View source: R/dshm_plot.R

Description

dshm_plot plots prediction grids, makes easier changing scale colours and intervals, provides the possibility to save the grid as a .shp file.

Usage

1
2
3
4
dshm_plot(prediction, grid, probability = FALSE, sightings = NULL,
  plot_title = NULL, scale_col = c("blue", "yellow", "red"),
  scale_lim = NULL, scale_val = NULL, cex = 1, saveRaster = FALSE,
  raster_name = NULL, resolution)

Arguments

prediction

Predictions for each grid cell in the prediction grid.

grid

Grid as SpatialPolygonsDataFrame.

probability

If TRUE colour label is Pr(Presence), if FALSE is Abundance. Default is FALSE.

sightings

sighting dataframe with at least three columns:

  • x: sighting x coordinate.

  • y: sighting y coordinate.

  • size: sighting size.

plot_title

Title of the plot.

scale_col

Vector with colour scale values. Length should correspond to the length of 'scale_val'.

scale_lim

Vector for lower and upper limits of the colour scale.

scale_val

Vector for the scale values corresponding to colour transition as defined in 'scale_col'.

cex

Size of the pixels in the map (visualization purpose only, for true scaled spatial map save as raster).

saveRaster

If TRUE the map is saved as a raster file. Default is TRUE.

raster_name

Name of the saved raster.

resolution

Raster resolution.

Details

For more information about fitting Hurdle models, plotting model predictions and much more you can download the fitting_Hurldle.pdf tutorial.

Value

Prediction map and raster image (if saveRaster = TRUE).

Author(s)

Filippo Franchini filippo.franchini@outlook.com


FilippoFranchini/dshm documentation built on April 25, 2020, 9:40 p.m.