Our goal: using a two-step approach, identify native species (polygons)
whose distributionoverlap -totally or partially- with that of the invasive.
Our problem: Some species (with small distribution) which are known to
occur within the invasive distribution range are being left out of the
final selection (checkedin QGIS). I suspect the function "isin" in the
fastshp package (2nd loop) fails to select some of the overlapping
polygons in Step 2, or some other problem. If a reproducible example is
absolutely required, I can upload to dropbox.
For the sake of simplicity, I will present present a case example
including one invasive species (e.g. wild boar) and all terrestrial
# Analysis of Wild Boar distributional overlap with IUCN mammal species
install.packages("raster") install.packages("fastshp", repos =
"http://rforge.net", type = "source")install.packages("cleangeo")
mypath <- ("/Users/ ... /Terrestrial mammals") files <-
list.files(path=mypath, pattern = "\\.shp$", full.names=T)
length(files) # 5,465 mammal species # Load study area