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 )
Results | The default output of |
---|---|
Occurrences | A |
country_map | A |
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 |
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] | X | numeric, x coordinates of cell [,2] | Y | numeric, y coordinates of cell [,3] | meanLat | numeric, mean latitude of occurrences within cell | [,4] |
meanLat | numeric, mean longitude of occurrences within cell | [,5] | NbeRec | numeric, Number of records | [,6] | NbeEsp | numeric, Number of species |
Input Occurrences
as a dataframe
should have the
following structure:
It is mandatory to respect field positions, but field names do not matter
[,1] | ddlat | numeric, latitude (in decimal degrees) |
[,2] | ddlon | numeric, longitude (in decimal degrees) |
[,3] | tax | character or factor, taxa names |
package fields function quilt.plot
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) }