plot.behavior_stream {ARPobservation} | R Documentation |
Plot method for behavior_stream
objects
Description
Creates a graphical representation of a set of simulated behavior streams.
Usage
## S3 method for class 'behavior_stream'
plot(
x,
session_color = "black",
episode_color = "blue",
episode_thickness = 2,
...
)
Arguments
x |
object of class |
session_color |
character string indicating the color of the lines that represent session time. Default is black. |
episode_color |
character string indicating the color of the bars that represent episode durations. Default is blue. |
episode_thickness |
numeric value indicating the thickness of the bars that represent episode durations. Default is 2. |
... |
Further arguments, not used for this method. |
Details
The plot is created using ggplot
from the ggplot2 package,
which must be installed.
Value
An object of class ggplot
.
Examples
if (requireNamespace("ggplot2", quietly = TRUE)) {
b_streams <- r_behavior_stream(n = 5, mu = 3, lambda = 10,
F_event = F_exp(), F_interim = F_exp(),
stream_length = 100)
plot(b_streams)
}
[Package ARPobservation version 1.2.2 Index]