plotStats: Plot statistics of multiple simulations

Description Usage Arguments See Also Examples

Description

This method plots descriptive statistics as i. e. mean, min, max, sd over all simulations depending on the time. The desired statistic values can be specified individually with the parameter funs. The plot is created with ggplot2 and can be modified afterwards.

Usage

1
2
3
4
5
6
7
plotStats(x, vars, funs, plottype, ...)

## S3 method for class 'multSimData'
plotStats(x, vars, funs, plottype = "line", ...)

## S3 method for class 'multSim'
plotStats(x, vars, funs, ...)

Arguments

x

object of class multSim or multSimData.

vars

character vector giving the names of variables to plot the statistics for.

funs

a list of function calls generated by funs, or a character vector of function names, or simply a function.

plottype

a string indicating which plotmethod should be used. Either "line" for geom_line or "smooth" for geom_smooth are possible. Other values are ignored.

...

Additional arguments for the function calls in funs.

See Also

summarise_at to get the calculated values of the statistics

Examples

1
2
3
4
5
6
7
## Not run: 
data("toggleSwitch")
ms <- multSim(toggleSwitch, seeds = 1:20)
plotStats(ms, vars = c("fA", "fB"), funs = "mean")
plotStats(ms, vars = "fB", funs = c("min", "max", "mean"))

## End(Not run)

CharlotteJana/pdmpsim documentation built on July 2, 2019, 5:37 a.m.