RichnessGrid: Species Richness and Abundance Grids from Point Records

Description Usage Arguments Value See Also Examples

View source: R/RichnessGrid.R

Description

Create a species richness or abundance grid, from a spgeoOUT object or a data.frame with species names and occurrence coordinates.

Usage

1
2
RichnessGrid(x, limits = c(-180, 180, -90, 90), reso,
             type = c("spnum", "abu"))

Arguments

x

an object of the class data.frame or spgeoIN or spgeoOUT or character string. If x is a data.frame, it must consist of three columns, indicating species name, longitude and latitude. If x is a character string, it can be the name of a tab delimited text file, with three columns indicating species name, longitude and latitude or a vector of species names. In the latter case the GBIF database is search for geo-referenced occurrences.

limits

numerical. A vector of the form (xmin, xmax, ymin, ymax) givin the raster limits in decimal degrees.

reso

numeric. resolution of the grid in minutes.

type

character string indicating the type of data displayed: “spnum” = number of species per grid cell, “abu” = the number of occurrence points per grid cell.

Value

a raster object.

See Also

MapRichness, MapGrid, RangeRichness.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# for x = data.frame
data(lemurs)
e <- c(-125, -105, 30, 50)
dat <- RichnessGrid(lemurs, e, reso = 60, type = "spnum")

# for x = character string
e <- c(-125, -105, 30, 50)

## Not run: 
dat <- RichnessGrid("Indri indri", e, reso = 60, type = "spnum")

## End(Not run)

speciesgeocodeR documentation built on May 30, 2017, 12:34 a.m.