FATE
simulationR/POST_FATE.graphic_mapPFGvsHS.R
POST_FATE.graphic_mapPFGvsHS.Rd
This script is designed to produce raster maps of PFG habitat
suitability and simulated occurrences for one (or several) specific
FATE
simulation year.
POST_FATE.graphic_mapPFGvsHS(
name.simulation,
file.simulParam = NULL,
years,
opt.stratum = "all"
)
a string
corresponding to the main directory
or simulation name of the FATE
simulation
default NULL
.
A string
corresponding to the name of a parameter file that will be contained into
the PARAM_SIMUL
folder of the FATE
simulation
an integer
, or a vector
of integer
,
corresponding to the simulation year(s) that will be used to extract PFG
binary maps
(optional) default all
.
The stratum
number from which to extract PFG binary maps
A list
containing one or several (one for each simulation
year) list
of ggplot2
objects, representing for each plant
functional group its map of modelled presence / absence vs
its
habitat suitability map.
One POST_FATE_[...].pdf
file is created :
GRAPHIC_B
map_PFGvsHS
to visualize the PFG presence within the studied area (probability and simulated occurrence)
This function allows to obtain, for a specific FATE
simulation and
a specific parameter file within this simulation, one preanalytical graphic.
For each PFG and each selected simulation year, raster maps are retrieved
from the results folder BIN_perPFG_allStrata
(unless the
opt.stratum
is used, then it will be from the folder
BIN_perPFG_perStrata
) and unzipped.
Informations extracted lead to the production of one graphic before the
maps are compressed again :
the comparison between each PFG habitat suitability map and
its simulated map of presence
It requires that the POST_FATE.relativeAbund
and the
POST_FATE.binaryMaps
function have been run
and that the folders BIN_perPFG_allStrata
and
BIN_perPFG_perStrata
exist.
if (FALSE) {
POST_FATE.graphic_mapPFGvsHS(name.simulation = "FATE_simulation"
, file.simulParam = "Simul_parameters_V1.txt"
, years = 850)
POST_FATE.graphic_mapPFGvsHS(name.simulation = "FATE_simulation"
, file.simulParam = "Simul_parameters_V1.txt"
, years = c(850, 950))
POST_FATE.graphic_mapPFGvsHS(name.simulation = "FATE_simulation"
, file.simulParam = "Simul_parameters_V1.txt"
, years = 850
, opt.stratum = 2)
}