View source: R/POST_FATE.graphic_mapPFG.R
POST_FATE.graphic_mapPFG | R Documentation |
FATE
simulationThis script is designed to produce one (or several) raster map
related to plant functional group results (richness, relative cover, light
or soil CWM) for one (or several) specific FATE
simulation year.
POST_FATE.graphic_mapPFG(
name.simulation,
file.simulParam = NULL,
years,
opt.stratum_min = 0,
opt.stratum_max = 10,
opt.doBinary = TRUE,
opt.no_CPU = 1,
opt.doPlot = TRUE
)
name.simulation |
a |
file.simulParam |
default |
years |
an |
opt.stratum_min |
(optional) default |
opt.stratum_max |
(optional) default |
opt.doBinary |
(optional) default |
opt.no_CPU |
(optional) default |
opt.doPlot |
(optional) default |
This function allows to obtain, for a specific FATE
simulation and
a specific parameter file within this simulation, up to six raster
maps and preanalytical graphics.
For each PFG and each selected simulation year, raster maps are retrieved
from the results folders ABUND_perPFG_perStrata
and
BIN_perPFG_perStrata
and unzipped.
Informations extracted lead to the production of up to six graphics before
the maps are compressed again :
map of PFG richness within each pixel, representing the sum
of binary maps
Richness is calculated with the
Leinster & Cobbold
2012 Ecology framework which allows to give more or less importance to
the commun species through the q
parameter :
q = 0
species richness
q = 1
Shannon entropy
q = 2
Simpson concentration
map of PFG relative cover, representing the sum of relative
abundance maps of all PFG
(potentially above a height threshold
defined by opt.stratum_min
)
if light was activated (see
PRE_FATE.params_globalParameters
), community
weighted mean of PFG light preferences (extracted from LIGHT
parameter within LIGHT
files, see
PRE_FATE.params_PFGlight
)
if soil was activated (see
PRE_FATE.params_globalParameters
), community
weighted mean of PFG soil preferences (extracted from SOIL_CONTRIB
parameter within SOIL
files, see
PRE_FATE.params_PFGsoil
)
It requires that the POST_FATE.relativeAbund
,
(POST_FATE.graphic_validationStatistics
) and
POST_FATE.binaryMaps
functions have been run and that the
folders BIN_perPFG_allStrata
and BIN_perPFG_perStrata
exist.
If opt.doBinary = TRUE
, abundance maps (absolute or relative) are
systematically multiplied by binary maps extracted from
BIN_perPFG_allStrata
and BIN_perPFG_perStrata
folders and
produced by POST_FATE.binaryMaps
function.
This way, produced raster maps reflect the validated/refined predictions.
opt.doBinary
can be set to FALSE
to reflect pure
simulation results.
A list
containing one or several (one for each simulation
year) list
of raster
and ggplot2
objects :
cover
raster
of relative coverage
DIV.0
raster
of species richness
DIV.1
raster
of Shannon entropy
DIV.2
raster
of Simpson concentration
CWM.light
raster
of light community weighted mean
CWM.soil
raster
of soil community weighted mean
cover
ggplot2
object, representing cover
raster
richness
ggplot2
object, representing
DIV.0
raster
CWM.light
ggplot2
object, representing
CWM.light
raster
CWM.soil
ggplot2
object, representing
CWM.soil
raster
‘POST_FATE_GRAPHIC_C_map_PFG_[...].pdf’ file is created containing up to four graphics :
to visualize the PFG cover within the studied area
to visualize the PFG richness within the studied area
to visualize the light CWM within the studied area
to visualize the soil CWM within the studied area
Three ‘PFGrichness_YEAR_[...]_STRATA_all_q[...].tif’ files are created into the simulation results folder :
PFG richness
PFG Shannon entropy
PFG Simpson concentration
Raster files are also created for cover, and light and soil CWM if those
modules were selected (see PRE_FATE.params_globalParameters
).
Maya Guéguen
POST_FATE.relativeAbund
,
POST_FATE.graphic_validationStatistics
,
POST_FATE.binaryMaps
## Not run:
POST_FATE.graphic_mapPFG(name.simulation = "FATE_simulation"
, file.simulParam = "Simul_parameters_V1.txt"
, years = 850
, opt.stratum_min = 3
, opt.no_CPU = 1)
POST_FATE.graphic_mapPFG(name.simulation = "FATE_simulation"
, file.simulParam = "Simul_parameters_V1.txt"
, year = c(850, 950)
, opt.doBinary = FALSE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.