| mjpModel-methods | R Documentation |
Give important information about a mjpModel in one character
string. This method is used internally to generate default filenames or plot
titles.
This is method plots single simulations of
markov jump processes defined as
mjpModel. There are also other plot
methods available that use ggplot2.
## S4 method for signature 'mjpModel'
format(
x,
begin = NULL,
end = NULL,
short = TRUE,
slots = c("parms", "init", "times"),
sep,
collapse
)
## S4 method for signature 'mjpModel,missing'
plot(x, y, ...)
x |
an object of class mjpModel with a simulation
stored in slot |
begin |
a character string that is pasted at the beginning. |
end |
a character string that is pasted at the end. |
short |
logical. If TRUE, a shorter version without space characters will be returned (useful to generate filenames). Defaults to TRUE. |
slots |
a vector specifying the names of all slots that shall be pasted
to the string. ' The default is |
sep |
a character string to separate the names and values of slots that
are vectors or lists (e. g. "times" or "parms"). It defaults to |
collapse |
a character string to separate the slots.
It defaults to |
y |
ignored |
... |
optional plotting parameters |
plotSeeds for another plot function
to plot single simulations
data("KendallBD")
format(KendallBD, begin = "ToggleSwitch__", end = ".rda")
format(KendallBD, begin = paste0(descr(toggleSwitch), ": "), short=FALSE)
parms(KendallBD) <- list()
cat(format(KendallBD, short = FALSE, collapse = ".\n",
slots = c("init", "times","parms"),
begin = "Kendalls birth-death-process:\n"))
data("SIRstoch")
sim <- sim(SIRstoch, seed = 1)
plot(sim, col = "red", lwd = 2)
# Alternative: plotSeeds
msim <- multSim(SIRstoch, seeds = 1)
plot <- plotSeeds(msim)
plot + ggplot2::facet_grid(variable ~ seed)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.