plot.behavior_stream: Plot method for 'behavior_stream' objects

Description Usage Arguments Details Value Examples

View source: R/plot_methods.R

Description

Creates a graphical representation of a set of simulated behavior streams.

Usage

1
2
3
4
5
6
7
8
## S3 method for class 'behavior_stream'
plot(
  x,
  session_color = "black",
  episode_color = "blue",
  episode_thickness = 2,
  ...
)

Arguments

x

object of class behavior_stream

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

1
2
3
4
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)

Example output



ARPobservation documentation built on May 1, 2021, 1:08 a.m.