Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/POST_FATE.graphic_evolutionStability.R
This script is designed to produce one graphical representation
for a FATE simulation : the evolution through time of the total
abundance and evenness of each habitat.
1 2 3 4 5 6 7 | POST_FATE.graphic_evolutionStability(
name.simulation,
file.simulParam = NULL,
movingWindow_size = 3,
movingWindow_step = 1,
opt.doPlot = TRUE
)
|
name.simulation |
a |
file.simulParam |
default |
movingWindow_size |
default |
movingWindow_step |
default |
opt.doPlot |
(optional) default |
This function allows to obtain, for a specific FATE simulation and
a specific parameter file within this simulation, one preanalytical graphic :
the evolution of total abundance (FATE
arbitrary unit) and evenness (between 0 and
1) of each habitat through simulation time, with evenness
representing the uniformity of the species composition of the habitat
(similar to Shannon entropy) :
\text{evenness} = - \frac{Σ(\text{proportion}_{\text{ PFG}_i} * log(\text{proportion}_{\text{ PFG}_i}))}{log(\text{no.PFG})}
with
\text{proportion}_{\text{ PFG}_i} = \frac{abund_{\text{ PFG}_i \text{, }\text{Habitat}_j}}{abund_{\text{ PFG}_{all}\text{, } \text{Habitat}_j}}
If the information has been provided (see
POST_FATE.temporalEvolution), the graphics will be also done
per habitat.
It requires that the POST_FATE.temporalEvolution
function has been run and that the file
POST_FATE_TABLE_PIXEL_evolution_abundance.csv exists.
A list containing two data.frame objects with the
following columns, and one ggplot2 object :
HABconcerned habitat
yearconcerned simulation year
totalAbundancetotal abundance over all the pixels within the concerned habitat
no.PFGnumber of PFG over all the pixels within the concerned habitat
evennessevenness over all the pixels within the concerned habitat
HABconcerned habitat
no.yearsnumber of simulation years used (moving window size)
yearStepstep between each simulation year of the moving window
yearStartfirst simulation year of the moving window
yearEndlast simulation year of the moving window
metricconcerned metric (either totalAbundance or
evenness)
meanmean value of the concerned metric over the years of the concerned moving window
sdvalue of standard deviation of the concerned metric over the years of the concerned moving window
cvvalue of coefficient of variation of the concerned metric over the years of the concerned moving window
ggplot2 object, representing the evolution of
total abundance and evenness of each habitat
Two POST_FATE_TABLE_HAB_evolution_[...].csv files are created :
always, containing tab.hab
if successive years available, containing
tab.stab
One POST_FATE_[...].pdf files is created :
to visualize for each habitat the evolution of its total abundance and its evenness through simulation time
Maya Guéguen
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Not run:
POST_FATE.graphic_evolutionStability(name.simulation = "FATE_simulation"
, file.simulParam = "Simul_parameters_V1.txt")
POST_FATE.graphic_evolutionStability(name.simulation = "FATE_simulation"
, file.simulParam = "Simul_parameters_V1.txt"
, opt.fixedScale = FALSE)
## End(Not run)
## ----------------------------------------------------------------------------------------- ##
## Load example data
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.