Compute extent of occurrences (EOO) for multiple taxa in square kilometres using geosphere package
and provide SpatialPolygons used for EOO computation
EOO.computing(XY, exclude.area=FALSE, country_map=NULL, export_shp=FALSE,write_shp=FALSE,
alpha=1, buff.alpha=0.1, method.range="convex.hull",
Name_Sp="species1",
buff_width=0.1, method.less.than3="not comp",
write_results=TRUE,
file.name="EOO.results", parallel = FALSE, NbeCores = 2, show_progress=FALSE)dataframe see Details
a logical, if TRUE, areas outside of country_map are cropped of SpatialPolygons used for calculating EOO. By default is FALSE
a SpatialPolygonsDataFrame or SpatialPolygons showing for example countries or continent borders. This shapefile will be used for cropping the SpatialPolygonsl if exclude.area is TRUE
a logical, whether shapefiles should be exported or not, see Value. By default is FALSE
a logical, if TRUE, export SpatialPolygons used for EOO computation as ESRI shapefiles in the working directory. By default is FALSE
a numeric, if method.range is "alpha.hull", value of alpha of the alpha hull, see ahull. By default is 1
a numeric, if method.range is "alpha.hull", define the buffer in decimal degree added to alpha hull. By default is 0.1
a character string, "convex.hull" or "alpha.hull". By default is "convex.hull"
a character string, if XY is for one taxon and field containing taxon names is not provided,
this item provide taxon name. By default is "Species1"
a numeric. For a specific case where all points of a taxa are on a straight line, see Details. By default is 0.1
a character string. If equal to "arbitrary", will give a value to species with two unique occurrences, see Details. By default is "not comp"
a logical. If TRUE, results will be exported in the working environment as a csv file. By default is TRUE
a character string. Name file for exported results in csv file. By default is "EOO.results"
a logical. Wether running in parallel. By default, it is FALSE
an integer. Register the number of cores for parallel execution. By default, it is 2
a logical. Whether a bar showing progress in computation should be shown. By default, it is FALSE
If export_shp is FALSE, a dataframe with one field containing EOO in square kilometres.
NA is given when EOO could not be computed because there is less than three unique occurrences
(or two if method.less.than3 is put to "arbitrary").
If export_shp is TRUE, a list with:
EOO in square kilometres
SpatialPolygons used for EOO computation
Input as a dataframe should have the following structure:
It is mandatory to respect field positions, but field names do not matter
| [,1] | ddlat | numeric, latitude (in decimal degrees) |
| [,2] | ddlon | numeric, longitude (in decimal degrees) |
| [,3] | tax | character or factor, optinal field with taxa names |
Important notes:
EOO will only be computed if there is at least three unique occurrences unless method.less.than3 is put to "arbitrary".
In that specific case, EOO for species with two unique occurrences will be equal to
Dist*Dist*0.1
where Dist is the distance in kilometres separating the two points.
For the very specific (and infrequent) case where all occurrences
are localized on a straight line (in which case EOO would be null),
EOO is estimated by the area of polygon surrounding this straight line with a buffer of buff.alpha decimal degree.
There is a warning when this happen.
Limitation
For a species whose occurrences span more than 180 degrees, EOO is not computed. This is the case for example for species whose distribution span the 180th meridian.
Gaston & Fuller 2009 The sizes of species'geographic ranges, Journal of Applied Ecology, 49 1-9
# NOT RUN {
data(dataset.ex)
data(land)
# }
# NOT RUN {
EOO <- EOO.computing(dataset.ex)
## This exclude areas outside of land (i.e. ocean) for EOO computation
EOO <- EOO.computing(dataset.ex,
exclude.area=TRUE, country_map=land)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab