map_bias {sampbias} | R Documentation |
Mapping Projected Bias Effects
Description
A plotting function to visualize the effect of accessibility bias caused by different biasing factors in space.
Usage
map_bias(x, gaz = NULL, sealine = TRUE, type = "sampling_rate")
Arguments
x |
a raster stack as generate by |
gaz |
a list of SpatialObjects, to be printed on the maps. Should be
the same objects provided to |
sealine |
logical. Should the coastline be added to the plots? Default is to TRUE. |
type |
character vector. One of c("sampling_rate", "log_sampling_rate", "diff_to_max"). If "sampling_rate".
the plot shows the raw projected sampling rate depending on the
biasing factors, if "log_sampling_rate", the plot shows the log10 transformed sampling rate, and if
"diff_to_max", the relative deviation of sampling rate from the maximum
rate as calculated using |
Value
A series of R plots based on ggplot2.
See Also
Examples
#simulate data
occ <- data.frame(species = rep(sample(x = LETTERS, size = 5), times = 10),
decimalLongitude = runif(n = 50, min = 12, max = 20),
decimalLatitude = runif(n = 50, min = -4, max = 4))
out <- calculate_bias(x = occ, terrestrial = TRUE)
proj <- project_bias(out)
map_bias(proj)