Provides four maps showing in grid cells of a given resolution : number of records, species richness, number of threatened species (CR+EN+VU) and proportion of threatened species. Based on quilt.plot.

map.res(
  Results,
  Occurrences,
  country_map = NULL,
  Resol = 1,
  threshold = 0,
  LatMin = NULL,
  LatMax = NULL,
  LongMin = NULL,
  LongMax = NULL,
  export_map = FALSE,
  file_name = NULL,
  export_data = FALSE
)

Arguments

Results

The default output of IUCN.eval applied to multiple species

Occurrences

A dataframe, see Details

country_map

A SpatialPolygonsDataFrame or SpatialPolygons showing for example countries or continent borders

Resol

numeric , resolution in decimal degrees

threshold

numeric, only grid cells with at least this number of records will be shown

LatMin

numeric, minimum latitude for the map

LatMax

numeric, maximum latitude for the map

LongMin

numeric, minimum longitude for the map

LongMax

numeric, maximum longitude for the map

export_map

logical, if TRUE, four maps in png will be created in the working directory if FALSE, maps will be displayed in the R session

file_name

character string. Name of the file

export_data

logical. If TRUE, a dataframe containing all information on the grid cell mapped is exported

Value

Produce four maps either in the R session (if export_map is FALSE) or in png format in the working directory (if export_map is TRUE)

If export_data is TRUE

Output

[,1]Xnumeric, x coordinates of cell [,2]Ynumeric, y coordinates of cell [,3]meanLatnumeric, mean latitude of occurrences within cell[,4]
meanLatnumeric, mean longitude of occurrences within cell[,5]NbeRecnumeric, Number of records[,6]NbeEspnumeric, Number of species

Details

Input Occurrences as a dataframe should have the following structure:

It is mandatory to respect field positions, but field names do not matter

[,1]ddlatnumeric, latitude (in decimal degrees)
[,2]ddlonnumeric, longitude (in decimal degrees)
[,3]taxcharacter or factor, taxa names

See also

package fields function quilt.plot

Examples

if (FALSE) { data(land) data(Malagasy_amphibian) Results <- IUCN.eval(Malagasy_amphibian, DrawMap=FALSE, country_map=land, SubPop=FALSE) ### This should run for 3 to 6 minutes depending of the computer. ### Maps covering the whole dataset with a minimum of 5 records in each cell map.res(Results=Results, Occurrences=Malagasy_amphibian, country_map=land, export_map=FALSE, threshold=5) ## Maps focusing on Madagascar with a minimum of 5 records in each cell map.res(Results=Results, Occurrences=Malagasy_amphibian, country_map=land, export_map=FALSE, threshold=5, LatMin=-25,LatMax=-12,LongMin=42, LongMax=52) ## Maps focusing on Madagascar at half degree resolution with a minimum of 5 records in each cell map.res(Results=Results, Occurrences=Malagasy_amphibian, country_map=land, export_map=FALSE,Resol=0.5, threshold=5, LatMin=-25,LatMax=-12,LongMin=42, LongMax=52) ## Maps have been exported in the directory IUCN__results_map map.res(Results=Results, Occurrences=Malagasy_amphibian, country_map=land, export_map=TRUE, threshold=5, LatMin=-25,LatMax=-12,LongMin=42, LongMax=52) ## Install speciesgeocodeR package for an example with their lemurs dataset library(speciesgeocodeR) data("lemurs_in") Results <- IUCN.eval(lemurs_in, DrawMap=FALSE, country_map=land, SubPop=FALSE) map.res(Results=Results, Occurrences=lemurs_in, country_map=land, export_map=FALSE, threshold=3, LatMin=-25,LatMax=-12,LongMin=42, LongMax=52, Resol=1) }