Learn R Programming

sperich (version 1.3-7)

add.Data.to.Grid: Add Data to Grid

Description

This function adds the species occurence data to the grid.

Usage

add.Data.to.Grid(dataset.one.species, dimension, shift, resolution=1)

Arguments

dataset.one.species
A dataset containing one species with its ID (named: speciesID) and the longitude (named: long) and latitude (named: lat) of the occurence locations of that species.
dimension
The dimension of the processed grid.
shift
The geographic coordinates of the origin of the grid.
resolution
The resolution of the grid in (geographical) degree.

Value

  • This function returns a grid which contains the species occurence information.

Details

This routine adds the species occurence data to the grid through adding their location as a point into it.

References

Raedig, C., Dorman, C.F., Hildebrandt, A. and Lautenbach, S. (2010). Reassessing Neotropical angiosperm distribution patterns based on monographic data: a geometric interpolation approach. Biodivers Conserv, 19, 1523-1546.

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)

#extract datasets of one species out of database
dataset.one.species <- extract.species(dataset.all.species, 3)

##add species occurence information to grid
grid <- add.Data.to.Grid(dataset.one.species, dimension, shift, resolution=1)

Run the code above in your browser using DataLab