POST_FATE.graphic_mapPFG: Create a map related to plant functional group results...

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/POST_FATE.graphic_mapPFG.R

Description

This 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.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
POST_FATE.graphic_mapPFG(
  name.simulation,
  file.simulParam = NULL,
  years,
  opt.stratum_min = 1,
  opt.stratum_max = 10,
  opt.doBinary = TRUE,
  opt.no_CPU = 1,
  opt.doPlot = TRUE
)

Arguments

name.simulation

a string corresponding to the main directory or simulation name of the FATE simulation

file.simulParam

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

years

an integer, or a vector of integer, corresponding to the simulation year(s) that will be used to extract PFG abundance and binary maps

opt.stratum_min

(optional) default 1.
An integer corresponding to the lowest stratum from which PFG abundances will be summed up

opt.stratum_max

(optional) default 10.
An integer corresponding to the highest stratum from which PFG abundances will be summed up

opt.doBinary

(optional) default TRUE.
If TRUE, abundance maps (absolute or relative) are systematically multiplied by binary maps (see Details)

opt.no_CPU

(optional) default 1.
The number of resources that can be used to parallelize the unzip/zip of raster files

opt.doPlot

(optional) default TRUE.
If TRUE, plot(s) will be processed, otherwise only the calculation and reorganization of outputs will occur, be saved and returned

Details

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 :

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.

Value

A list containing one or several (one for each simulation year) list of raster and ggplot2 objects :

tab
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

plot
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 :

map_PFGcover

to visualize the PFG cover within the studied area

map_PFGrichness

to visualize the PFG richness within the studied area

PFGlight

to visualize the light CWM within the studied area

PFGsoil

to visualize the soil CWM within the studied area

Three ‘PFGrichness_YEAR_[...]_STRATA_all_q[...].tif’ files are created into the simulation results folder :

q0

PFG richness

q1

PFG Shannon entropy

q2

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).

Author(s)

Maya Guéguen

See Also

POST_FATE.relativeAbund, POST_FATE.graphic_validationStatistics, POST_FATE.binaryMaps

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## 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)
                                    
                                    

MayaGueguen/RFate documentation built on Oct. 17, 2020, 8:06 a.m.