plot.baton_preview: Plot baton_preview metadata

plot.baton_previewR Documentation

Plot baton_preview metadata

Description

Will parse the baton metadata and logbook to provide graphical aides in determining when pass, grab, and logging operations occured.

Usage

## S3 method for class 'baton_preview'
plot(
  baton,
  relative_time = TRUE,
  relative_units = "secs",
  separate = FALSE,
  include_logs = FALSE,
  x_label_length = 3,
  point_offset = 0.02,
  ...
)

Arguments

baton

S3 object of class 'baton', possibly 'baton_preview'.

relative_time

Boolean, should time be relative to start or absolute (in seconds).

relative_units

Default 'secs' (passed to 'difftime').

separate

Boolean, determine if pass numbers should be on separate lines.

include_logs

Boolean, include or exclude log times.

x_label_length

Numeric value, for how many x-axis ticks to draw.

point_offset

Numeric value, absolute value for how far to offset points from lines.

...

Additional parameters to plotting features (not in use yet...)

Examples

## Not run: 
library(relay)

# Create a new baton
test_baton <- create_baton()
write_logbook(test_baton, 'Test message 1')
test_baton <- pass_baton(test_baton)
test_baton <- grab_baton(test_baton)
write_logbook(test_baton, 'Test message 2')
test_baton <- pass_baton(test_baton)

plot(test_baton)
plot(test_baton, relative_time =  TRUE, separate = TRUE, include_logs = TRUE)

# Plot a baton_preview
plot(preview_baton('path/to/baton.yml'))

## End(Not run)

al-obrien/relay documentation built on May 6, 2023, 10:19 p.m.