line_plot_year: Line plots of Vortex parameters vs years

Description Usage Arguments Details Value Examples

View source: R/data_plotting.R

Description

line_plot_year generates line plots of the selected Vortex parameters for the selected populations, for all simulated years.

Usage

1
2
3
4
5
6
7
8
9
line_plot_year(
  data,
  project,
  scenario,
  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)

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

1
2
3
4
5
6
# Using Pacioni et al. example data. See ?pac.clas for more details.
data(pac.clas)
lineplot.st.classic <- line_plot_year(data=pac.clas, project='Pacioni_et_al',
                       scenario='ST_Classic',
                       params=c('PExtinct', 'Nextant', 'Het', 'Nalleles'),
                       save2disk=FALSE)

vortexR documentation built on April 14, 2020, 7:23 p.m.