plotSeeds: Plot method for simulations

View source: R/multSimData_outputMethods.R

plotSeedsR Documentation

Plot method for simulations

Description

This method plots the simulation for every seed in the input. Continous variables are plotted as line plots, discrete variables in a stacked barplot beneath. The plot is created with ggplot2 and can be modified afterwards.

Usage

plotSeeds(x, seeds, ...)

## S3 method for class 'multSimData'
plotSeeds(x, seeds = NULL, ylim, ...)

## S3 method for class 'multSim'
plotSeeds(x, seeds, ...)

Arguments

x

object of class multSim or multSimData.

seeds

vector with seed numbers to plot. This is optional if x is a multSimData object.

...

additional arguments, currently not used.

ylim

a length-2 numeric defining the scale of the y-axis.

Note

A maximal number of 4 seeds can be plotted. The method requires the package tidyr.

Examples

data("toggleSwitch")
msim <- multSim(toggleSwitch, seeds = 1:2)
plotSeeds(msim)
plotSeeds(msim, seeds = 1) + ggplot2::facet_grid(variable ~ seed)

CharlotteJana/pdmpsim documentation built on Oct. 21, 2024, 4:54 p.m.