animateCohorts: Animate sediment cohorts

View source: R/animateCohorts.R

animateCohortsR Documentation

Animate sediment cohorts

Description

This function takes two MEM outputs, cohorts and scenario tables, as inputs and visualizes soil formation as an animated .gif

Usage

animateCohorts(
  cohorts,
  scenario,
  filename = "MEM-CTM-animated.gif",
  savePath = getwd(),
  chPalette = c("#56B4E9", "#999999", "#E69F00", "#009E73"),
  trackThresholds = c("meanSeaLevel", "meanHighWater"),
  duration = 30,
  width = 4.5,
  height = 4.5
)

Arguments

cohorts

data frame, annually tracked soil mass cohorts output from runCohortMem

scenario

data frame, annual summaries of inputs and outputs from runCohortMem

filename

character, name of the output file

savePath

character, filepath to save animation to

chPalette

vector, a vector of colors to use to symbolize the different mass cohorts

trackThresholds

vector, a vector of characters indicating which water levels in the scenario table to map as horizontal lines

duration

numeric, length in seconds of the animation

width

numeric, width in inches of the .gif

height

numeric, height in inches of the .gif


tilbud/rCTM documentation built on March 30, 2024, 10:06 a.m.