line_plot_year_mid: Line plots of Vortex parameters vs years

line_plot_year_midR Documentation

Line plots of Vortex parameters vs years

Description

line_plot_year_mid generates line plots of the selected Vortex parameters for the selected populations, from year zero to yrmid. The purpose of these plots is to 'zoom' in the initial phase of the simulations to better appreciate dynamics of the parameters of interest.

Usage

line_plot_year_mid(
  data,
  project,
  scenario,
  yrmid = 1,
  params = c("PExtinct", "Nextant", "Het", "Nalleles"),
  plotpops = c("all"),
  save2disk = TRUE,
  dir_out = "Plots"
)

Arguments

data

A df from collate_dat

project

Vortex project name (used to name the output)

scenario

Vortex scenario name (used to name the output)

yrmid

The last year to plot

params

Vortex parameters to be plotted, default: c('PExtinct', 'Nextant', 'Het', 'Nalleles')

plotpops

The populations to be included in the plot, default: 'all'

save2disk

Whether to save the output to disk, default: TRUE

dir_out

The local path to store the output. Default: Plots

Details

Plots are ggplot objects. When save2disk=TRUE these are saved as .rda and .pdf files

Value

Line plot(s)

Examples

# Using Pacioni et al. example data. See ?pac.clas for more details.
data(pac.clas)
lineMidPlot.st.classic <- line_plot_year_mid(data=pac.clas,
                          project='Pacioni_et_al',
                          scenario='ST_Classic',
                          yrmid=50,
                          params=c('PExtinct', 'Nextant', 'Het', 'Nalleles'),
                          save2disk=FALSE)

carlopacioni/vortexR documentation built on May 6, 2022, 12:07 p.m.