I am trying to do species distribution mapping in R for invasive oyster species (marine).
With the code that I am using, it will plot points only on land (ext= geographic.extent
). I cannot find other "extent" options for example marine.extent
or a way to do -geographic.extent
so that it would be everything BUT the currently plotted area.
# Randomly sample points (same number as our observed points)
background <- randomPoints(mask = mask, # Provides resolution of sampling points
n = nrow(obs.data), # Number of random points
ext = geographic.extent, # Spatially restricts sampling
extf = 1.25) # Expands sampling a little bit
# Plot the base map
plot(wrld_simpl,
xlim = c(0, 30), #north and baltic sea
ylim = c(50, 70),
axes = TRUE,
col = "grey95",
main = "Presence and pseudo-absence points")
# Add the background points
points(background, col = "grey30", pch = 1, cex = 0.75)