Learn R Programming

sperich (version 1.5-8)

getNarrowEndemics: Narrow endemic species extraction

Description

This function extracts the row number of narrow endemic species in the given dataset.

Usage

getNarrowEndemics(dataset.all.species, all.species, 
			narrow.endemic.limit, dimension, shift, 
			resolution)

Value

This function returns a vector containing the row numbers of narrow endemic species in the given dataset.

Arguments

dataset.all.species

A dataset containing all observed species with their ID (named: speciesID) and the longitude (named: long) and latitude (named: lat) of their occurrence location.

all.species

A vector with the numbers of the species which should be mentioned. If the first value is -1, all species in the database will be used.

narrow.endemic.limit

This value determines the limit of points and the maximum distance of these points up to which a species is considered as narrow endemic species.

dimension

The dimension of the grid which should be processed.

shift

The geographic coordinates of the origin of the grid which should be processed.

resolution

The resolution of the grid which should be processed in (geographical) degree.

Author

Maximilian Lange, Claudia Raedig

Details

This function extracts the row numbers of narrow endemic species in the given datasets.

Examples

Run this code
## load data
data(dataset.all.species)

## create grid parameters
dimension <- getDimension(dataset.all.species, resolution=1)
shift <- getShift(dataset.all.species)

## search narrow endemic species in row 100 to 200 in the dataset
narrow.endemic.species <- getNarrowEndemics(dataset.all.species,
				all.species=100:200, narrow.endemic.limit=8,
				dimension, shift, resolution=1)

Run the code above in your browser using DataLab