View source: R/animateCohorts.R
animateCohorts | R Documentation |
This function takes two MEM outputs, cohorts and scenario tables, as inputs and visualizes soil formation as an animated .gif
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
)
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 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.