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

View source: R/plot.agd.R

plot.agdR Documentation

Plot method for the agd R6 class.

Description

This method renders scatter plots iteratively and interactively using results from an agd object.

Usage

## S3 method for class 'agd'
plot(x, ..., id)

Arguments

x

Required: an agd object.

...

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

id

Optional: a vector representing participant IDs in x for which to render scatter plots. If id is unset, scatter plots for all participants in x will be rendered iteratively.

Value

Returns ggplot2 objects invisibly.

Examples

# Initialize agd R6 class
agd_data <- agd$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.