pointCompMap {voluModel} | R Documentation |
Comparative point mapping
Description
A convenient wrapper around ggplot
to generate formatted plots comparing two sets of
occurrence point plots.
Usage
pointCompMap(
occs1,
occs2,
spName,
land = NA,
occs1Col = "#bd0026",
occs2Col = "#fd8d3c",
agreeCol = "black",
occs1Name = "Set 1",
occs2Name = "Set 2",
landCol = "gray",
waterCol = "steelblue",
ptSize = 1,
verbose = TRUE,
...
)
Arguments
occs1 |
A |
occs2 |
A |
spName |
A character string with the species name to be used in the plot title. |
land |
An optional coastline polygon shapefile
of types |
occs1Col |
Color for occurrence points on map |
occs2Col |
Color for occurrence points on map |
agreeCol |
Color for occurrence points shared
between |
occs1Name |
An optional name for the first set
of occurrences, which will be color-coded to
|
occs2Name |
An optional name for the first set
of occurrences, which will be color-coded to
|
landCol |
Color for land on map |
waterCol |
Color for water on map |
ptSize |
|
verbose |
|
... |
Additional optional arguments to pass to
|
Value
A ggplot
plot object.
Note
The x and y column names of occs1
and occs2
must match.
See Also
Examples
set.seed(5)
occs <- data.frame(cbind(decimalLatitude = sample(seq(7,35), 24),
decimalLongitude = sample(seq(-97, -70), 24)))
set.seed(0)
occs1 <- occs[sample(1:nrow(occs),
size = 12, replace = FALSE),]
set.seed(10)
occs2 <- occs[sample(1:nrow(occs),
size = 12, replace = FALSE),]
pointCompMap(occs1 = occs1, occs2 = occs2,
occs1Col = "red", occs2Col = "orange",
agreeCol = "purple",
occs1Name = "2D",
occs2Name = "3D",
waterCol = "steelblue",
spName = "Steindachneria argentea",
ptSize = 2,
verbose = FALSE)