multSimData: Create data.frame with simulations

multSimDataR Documentation

Create data.frame with simulations

Description

This method transforms objects of class multSim or multSimCsv into a specific data.frame of class multSimData. Most plot method of package pdmpsim are based on this class. The data.frame has five columns:

  • time for the time value,

  • seed for the seed on which the simulation was created,

  • type indicating if the variable is discrete or continous,

  • variable for the name of the simulated variable,

  • value for the simulated value.

Methods that use objects of class multSimData as input are plot, plotSeeds, plotTimes, plotStats, hist and density.

Usage

getMultSimData(x, times, seeds)

## S3 method for class 'multSim'
getMultSimData(x, times, seeds)

## S3 method for class 'multSimCsv'
getMultSimData(x, times, seeds)

## S3 method for class 'multSimData'
getMultSimData(x, times, seeds)

## S4 method for signature 'pdmpModel'
getMultSimData(x, times, seeds)

Arguments

x

an object of class multSim, multSimCsv, multSimData or pdmpModel

times

vector with specific time values for which the simulation results (for all seeds) shall appear in the data.frame

seeds

vector with specific seeds for which the simulation results (for all times) shall appear in the data.frame

Value

a data.frame of class multSimData with simulation results.

Examples

data("toggleSwitch")
ms <- multSim(toggleSwitch, seeds = 1:5)
d <- getMultSimData(ms, seeds = 1:3, times = c(5, 10))
print(d)

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