pointMap {voluModel}R Documentation

Point mapping

Description

A convenient wrapper around ggplot to generate formatted occurrence point plots.

Usage

pointMap(
  occs,
  spName,
  land = NA,
  ptCol = "#bd0026",
  landCol = "gray",
  waterCol = "steelblue",
  ptSize = 1,
  verbose = TRUE,
  ...
)

Arguments

occs

A data.frame with at least two columns named "longitude" and "latitude" or that can be coerced into this format.

spName

A character string with the species name to be used in the plot title.

land

An optional coastline polygon shapefile of types sf or SpatRaster to provide geographic context for the occurrence points.

ptCol

Color for occurrence points on map

landCol

Color for land on map

waterCol

Color for water on map

ptSize

numeric value for cex; size of occurrence points on map.

verbose

logical. Switching to FALSE mutes message describing which columns in occs are interpreted as x and y coordinates.

...

Additional optional arguments to pass to ggplot initial plot object.

Value

A ggplot plot object.

See Also

ggplot

Examples

occs <- read.csv(system.file("extdata/Steindachneria_argentea.csv",
                             package='voluModel'))
spName <- "Steindachneria argentea"
pointMap(occs = occs, spName = spName,
         land = rnaturalearth::ne_countries(scale = "small",
                                            returnclass = "sf")[1])


[Package voluModel version 0.2.1 Index]