Description Usage Arguments Details Value Author(s) Examples
View source: R/checkOcc_function.R
From 'SpatialPoints' of multiple species, gives the species and its occurrences that are inside of a polygon (ESRI shapefile format) representing a region of interest (e.g. study area, continent, country or other regions with specific boundaries).
1 |
occ |
Occurrences records of the species (coordinates in decimal degrees). 'It might correspond to
NOTE: If path is provided, each .csv file should correspond to only one species and the file must be named with the corresponding species names. The files must have 3 columns identified as "species" (species names or other identification of taxa), "long" (longitude), "lat" (latitude). Longitude must be in a column before the latitude column. |
crs |
The Coordinate Reference System (CRS) specifing the projection and datum of dataset. Could be a CRS object or a character string. |
distOcc |
A value corresponding to the minimum distance to
consider two coordinates as not duplicate. Values up to this distance will
correspond to duplicates and removed. Units of this value must be in km. Default
is zero (i.e. only exactly coincindent coordinates will be removed).
For more details,see |
poly |
A polygon (ESRI shapefile from a 'SpatialPolygonsDataFrame' class) of the specific area to be checked. |
SpOcc |
(logical) Whether the output should also return the 'SpatialPoints'
of species filtered based on the poly boundaries. Default is |
The function filter the initial dataset of species (occ)
based on a given region (poly). NOTE: if SpOcc is TRUE
, the
'SpatialPoints' returned encompass all set of occurrences and not a subset
that match with the specified region (poly). Therefore, the 'SpatialPoints'
are NOT cleaned to remove the records falling outside the polygon checked and to
restrict the 'SpatialPoints' only to occurrences recorded inside of polygon,
but just filtered to reduce the species from initial dataset based in the area
of poly.
By default, checkOcc
returns a data.frame of species and its
respective occurrences matching with the provided polygon. If SpOcc is TRUE
,
checkdOcc
returns a list with two elements:
A data.frame with the species and total occurrences filtered by the polygon.
A list of 'SpatialPoints' from each species that match with polygon, but without clean the records to remove those falling outside the polygon checked. See details.
Thaís Dória & Daniel Gonçalves-Souza
1 2 3 4 5 6 7 8 9 | ### List of 'data.frame' as Input ###
check1 <- checkOcc(occ_plants, crs = "+proj=longlat +datum=WGS84 +ellps=WGS84
+towgs84=0,0,0", poly=poly, distOcc = NULL, SpOcc = TRUE)
### spOcc or list of 'SpatialPoints' as Input ###
check2 <- checkOcc(spOcc_plants, crs = "+proj=longlat +datum=WGS84 +ellps=WGS84
+towgs84=0,0,0", poly=poly, distOcc = 0.1, SpOcc = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.