plot.intrinsicAssign {MigConnectivity} | R Documentation |
Basic plot function for the different isoAssign outputs
Description
Generates a basic plot of the isotope assignments. If
map = 'population'
generates a single map. If
map = 'probability' or map = 'odds'
generates a map for each
individual is generated. User is asked for input before each individual is
drawn.
Usage
## S3 method for class 'intrinsicAssign'
plot(x, map, ...)
Arguments
x |
an isoAssign object |
map |
which |
... |
additional arguments passed to plot function |
Value
No return value, called to generate plot(s).
See Also
isoAssign
Examples
extensions <- c("shp", "shx", "dbf", "sbn", "sbx")
tmp <- tempdir()
for (ext in extensions) {
download.file(paste0(
"https://raw.githubusercontent.com/SMBC-NZP/MigConnectivity",
"/master/data-raw/Spatial_Layers/OVENdist.",
ext),
destfile = paste0(tmp, "/OVENdist.", ext), mode = "wb")
}
OVENdist <- sf::st_read(paste0(tmp, "/OVENdist.shp"))
OVENdist <- OVENdist[OVENdist$ORIGIN==2,] # only breeding
sf::st_crs(OVENdist) <- sf::st_crs(4326)
download.file(paste0(
"https://raw.githubusercontent.com/SMBC-NZP/MigConnectivity",
"/master/data-raw/deltaDvalues.csv"),
destfile = paste0(tmp, "/deltaDvalues.csv"))
OVENvals <- read.csv(paste0(tmp, "/deltaDvalues.csv"))
b <- isoAssign(isovalues = OVENvals[,2],
isoSTD = 12,
intercept = -10,
slope = 0.8,
odds = NULL,
restrict2Likely = TRUE,
nSamples = 1000,
sppShapefile = OVENdist,
assignExtent = c(-179,-60,15,89),
element = "Hydrogen",
period = "GrowingSeason") # setting for demonstration only
plot(b, map = "population")
[Package MigConnectivity version 0.4.7 Index]