Learn R Programming

ConR (version 1.2.4)

locations.comp: Number of locations

Description

Compute number of locations for multiple taxa

Usage

locations.comp(XY, method = "fixed_grid",
                           nbe_rep = 0,
                           protec.areas = NULL, 
                           Cell_size_locations = 10,
                           method_protected_area="no_more_than_one", 
                           ID_shape_PA="WDPA_PID", 
                           Rel_cell_size=0.05,
                           parallel=FALSE,
                           NbeCores=2)

Arguments

XY

dataframe see Details

method

a character string, indicating the method used for estimating the number of locations. "fixed_grid" or "sliding scale". See details. By default, it is "fixed_grid"

nbe_rep

a numeric, indicate the number of raster with random starting position for estimating the number of location. By default, it is 0 but some minimal translation of the raster are still done

protec.areas

a SpatialPolygonsDataFrame, shapefile with protected areas. If provided, this will be taken into account for calculating number of location (see Details and method_protected_area). By default, no shapefile is provided

Cell_size_locations

a numeric, value indicating the grid size in kilometres used for estimating the number of location. By default, equal to 10

method_protected_area

a character string. By default is "no_more_than_one"", which means occurrences within protected areas (if provided) will not be taken into account for estimating the number of locations following the grid system, see Details. By default, it is "no_more_than_one"

ID_shape_PA

a character string, indicating the field name of protec.areas with ID of the SpatialPolygonsDataFrame of protected areas

Rel_cell_size

a numeric, if method_locations="sliding scale", Cell_size_locations is ignored and the resolution is given by the maximum distance separating two occurrences multiplied by Rel_cell_size. By default, it is 0.05

parallel

a logical. Wether running in parallel. By default, it is FALSE

NbeCores

an integer. Register the number of cores for parallel execution. By default, it is 2

Value

A list with one list for each species containing [[1]]SpatialPolygonDataframe and [[2]]vector of the number of location.

Details

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

Examples

Run this code
# NOT RUN {
data(dataset.ex)
# }
# NOT RUN {
locations <- locations.comp(dataset.ex)

# }
# NOT RUN {
# }

Run the code above in your browser using DataLab