POST_FATE.graphic_evolutionPixels: Create a graphical representation of the evolution of PFG...

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

View source: R/POST_FATE.graphic_evolutionPixels.R

Description

This script is designed to produce one graphical representation for a FATE simulation : the evolution through time of the abundance of each PFG for 5 (or more) randomly selected cells of the studied area.

Usage

1
2
3
4
5
6
7
POST_FATE.graphic_evolutionPixels(
  name.simulation,
  file.simulParam = NULL,
  opt.cells_ID = NULL,
  opt.fixedScale = TRUE,
  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

opt.cells_ID

(optional) default NULL.
The cells ID of the studied area for which PFG abundances will be extracted

opt.fixedScale

(optional) default TRUE.
If FALSE, the ordinate scale will be adapted for each PFG for the graphical representation of the evolution of abundances through time

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, one preanalytical graphic :

It requires that the POST_FATE.temporalEvolution function has been run and that the file POST_FATE_TABLE_PIXEL_evolution_abundance.csv exists (as well as the POST_FATE_TABLE_PIXEL_evolution_light.csv and POST_FATE_TABLE_PIXEL_evolution_soil.csv files if those modules were activated).

Value

A list containing one data.frame object with the following columns, and one ggplot2 object :

tab
TYPE

concerned information (either 'light', 'abundance' or 'soil')

GROUP

concerned entity (either 'STRATUM_[...]', PFG name or 'soil')

ID.pixel

number of the concerned pixel

HAB

habitat of the concerned pixel

YEAR

concerned simulation year

value

concerned value extracted from .csv files produced by POST_FATE.temporalEvolution

plot

ggplot2 object, representing the evolution of each PFG abundance, and light and soil resources if those modules were activated

One POST_FATE_TABLE_PIXEL_evolution_pixels_[...].csv file is created :

pixels ids

always, containing the data.frame detailed above

One POST_FATE_[...].pdf file is created :

GRAPHIC_A
pixels

to visualize for each PFG the evolution of its abundance within each selected pixel through simulation time

Author(s)

Maya Guéguen

See Also

POST_FATE.temporalEvolution

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run:                       
POST_FATE.graphic_evolutionPixels(name.simulation = "FATE_simulation"
                                  , file.simulParam = "Simul_parameters_V1.txt")
                                    
POST_FATE.graphic_evolutionPixels(name.simulation = "FATE_simulation"
                                  , file.simulParam = "Simul_parameters_V1.txt"
                                  , opt.fixedScale = FALSE)

## End(Not run)
                                    


## ----------------------------------------------------------------------------------------- ##
## Load example data

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