quickrich: Perform error checks and produce richness map

Description Usage Arguments Value Author(s) See Also Examples

View source: R/quickrich.R

Description

Performs error checks on the data (using quickclean) and removes records that contain errors before producing a species richness map

Usage

1
2
quickrich(dat,world, ID = "ID", Species = "Species", x = "x", 
y = "y", countries = "", others = "", res, msk, ext)

Arguments

dat

A dataframe containing the required biogeo fields (see checkdatastr)

ID

A field of unique identifiers

world

a shapefile of the world, where the column containing the country names must be "NAMES"; see data(wrld_simpl)

Species

A field of species names

x

x-coordinate in decimal degrees

y

y-coordinate in decimal degrees

countries

A field containing country names (optional). If the countries field is specified then a check for mismatches is done between the countries in the country field and those extracted from a world map. It is advisable not to specify this parameter for marine species.

others

The names of other fields to be included

res

Spatial resolution of the richness map (in minutes)

msk

A mask index of the same spatial resolution as res

ext

The extent for the map. This can be ext="p" to use the point data to calculate the extent. It could be an Exent object from the Raster package or a vector containing the following: minx, maxx, miny, maxy.

Value

A raster of species richness

Author(s)

Mark Robertson

See Also

richness, richnessmap, quickclean

Examples

1
2
3
ex1 <- c(15,35,-36,-23) # set the extent
rich<-quickrich(dat,world,ID='ID',Species='Species',x='x',y='y',
countries = "",others='',res=60,msk=msk60,ext=ex1)

biogeo documentation built on May 1, 2019, 8:05 p.m.