Description Usage Arguments Value Examples
Plot the species occurrences with map background for visualisation
1 |
regional |
logical, whether the whole world should be plotted as the background or only the region adjacent to the species countries of occurrence. |
range |
shapefile, the user can provide a specialist range map, or a convex hull to be visualised with the point occurrence. |
occ |
dataFrame of the species occurrence. Output of function occData. |
This function plots the species occurrence
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | # Load exemplary data
data(Euchloe_ausonia)
sps_occurrence <- occData(Euchloe_ausonia)
plotData(sps_occurrence)
# Create a data.frame containing species names and coordinates
test_data <- data.frame(sps=rep("Equus acephalus",10),
lon=c(-43.2,-58.4,-56,-44,-54.5,-57.4,-60.1,-68.5,-71.3,-47.5),
lat=c(-22.9,-34.6,-34.8,-20,-25.5,-25.2,-3,-32.5,-41.1,-15.5),
gender=rep("female",10),head_size=rep("headless individual"),
occ=c(TRUE,TRUE,TRUE,FALSE,FALSE,TRUE,TRUE,FALSE,TRUE,TRUE))
sps_occurrence <- occData(test_data,"sps","lon","lat","occ")
plotData(sps_occurrence)
# Plot occurrences with the whole world as background
plotData(sps_occurrence,regional=FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.