Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/IUCNeval.functionv11.R
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
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
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 |
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 |
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 | ||||
[,7] | NbeThreatened | numeric, Number of threatened species | ||||
[,8] | PropThreatened | numeric, Proportion of threatened species | ||||
Gilles Dauby
package fields function quilt.plot
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | ## Not run:
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)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.