plot.agd_worker: Plot method for the agd_worker R6 class.

View source: R/plot.agd_worker.R

plot.agd_workerR Documentation

Plot method for the agd_worker R6 class.

Description

This method renders a scatter plot using results from an agd_worker object.

Usage

## S3 method for class 'agd_worker'
plot(x, ..., title_size = 11, axis_size = 9, label_size = 3)

Arguments

x

Required: an agd_worker object.

...

Optional: arguments to be passed to methods. Note: currently not used.

title_size

Required (default: 11): a length-one numeric vector representing the title font size.

axis_size

Required (default: 9): a length-one numeric vector representing the axis font size .

label_size

Required (default: 3): a length-one numeric vector representing the label font size.

Value

Returns a ggplot2 object invisibly.

Examples

# Initialize agd_worker R6 class
agd_data <- agd_worker$new(
  id = "jane-canuck",
  age = 10,
  agd_lfe = system.file("extdata", "jane-canuck-lfe.agd", package = "chms"),
  agd_nml = system.file("extdata", "jane-canuck-nml.agd", package = "chms"),
  epoch_length = 15,
  day_max = 2,
  sleep_algo = "barreira",
  non_wear_algo = "barreira"
)

# Run data processing pipeline (load, clean, classify and summarize data)
agd_data$run()

# Plot data
plot(agd_data)

chms documentation built on Oct. 17, 2026, 5:07 p.m.