RRphylogeography {RRgeo} | R Documentation |
Find species area of origin
Description
The function integrates phylogenetic and geographical data (i.e., habitat suitability maps), along with tools to model species' movements across landscapes. This integration allows for inference of the most probable area of origin (i.e. speciation) or regions of historical contact across time and space between a pair of target species.
Usage
RRphylogeography(spec1,spec2,pred,occs,aggr=NULL,time_col=NULL,
kde_inversion=FALSE,resistance_map=NULL,th=0.5,clust=0.5,plot=FALSE,
mask_for_pred=NULL,standardize=TRUE,output.dir)
Arguments
spec1 , spec2 |
character. The names of the sister species whose area of origin should be inferred. |
pred |
a list of two |
occs |
a list of two |
aggr |
positive integer. Aggregation factor expressed as number of cells in each direction to be aggregated by averaging cell values (optional). |
time_col |
character. Name of the |
kde_inversion |
logical. If |
resistance_map |
a |
th |
numeric. The threshold value to define most suitable cells of the species pair as predicted via SDMs. |
clust |
numeric. The proportion of the proportion of clusters to be used
in parallel computing. Default is 0.5. If |
plot |
logical. If |
mask_for_pred |
a |
standardize |
logical. If |
output.dir |
character. The file path wherein |
Details
RRphylogeography
identifies the most suitable cells for both
target species by relying on the th
value. This threshold represents
a numeric quantile so that any habitat suitability value greater than 0 that
exceeds the value is considered to belong to the most suitable cells for the
species. Conversely, the cells having habitat suitability values lower than
th
are excluded from distance calculation.
Value
A list of SpatRaster
objects which includes the area of the
origin (RPO) and both relative probability (RPO) maps for the species pair
calculated for each layer in the prediction maps.
Author(s)
Alessandro Mondanaro, Mirko Di Febbraro, Silvia Castiglione, Carmela Serio, Marina Melchionna, Pasquale Raia
References
Mondanaro, A., Castiglione, S., Di Febbraro, M., Timmermann, A., Girardi, G., Melchionna, M., Serio, C., Belfiore, A.M., & Raia, P. (2025). RRphylogeography: A new method to find the area of origin of species and the history of past contacts between species. Methods in Ecology and Evolution, 16: 546-557. 10.1111/2041-210X.14478
See Also
Examples
library(RRgeo)
library(terra)
library(sf)
newwd<-tempdir()
# newwd<-"YOUR_DIRECTORY"
rast(system.file("exdata/U.arctos_suitability.tif", package="RRgeo"))->map1
rast(system.file("exdata/U.maritimus_suitability.tif", package="RRgeo"))->map2
load(system.file("exdata/Ursus_occurrences.Rda", package="RRgeo"))
list(Ursus_arctos=map1,Ursus_maritimus=map2)->pred
list(Ursus_arctos=occs_arctos,Ursus_maritimus=occs_marit)->occs
RRphylogeography(spec1="Ursus_arctos",
spec2="Ursus_maritimus",
pred=pred,
occs=occs,
aggr=5,
time_col="TIME_factor",
kde_inversion=FALSE,
resistance_map=NULL,
clust=NULL,
plot=FALSE,
mask_for_pred=NULL,
th=0.7,
standardize=TRUE,
output.dir=newwd)