analyse_kinetics_intervals: Run a kinetics worker over each interval and collate results

View source: R/aanalyse_kinetics_helpers.R

analyse_kinetics_intervalsR Documentation

Run a kinetics worker over each interval and collate results

Description

Shared skeleton for ⁠analyse_kinetics.*⁠ methods: normalises data to a named list of interval data frames, splits sample groups via split_kinetics_groups(), calls the method worker in kinetics_workers once per interval, and collates results via build_kinetics_results().

Usage

analyse_kinetics_intervals(
  data,
  method,
  worker_args,
  nirs_quo,
  time_quo,
  group_intervals,
  zero_time,
  verbose,
  call,
  env,
  fallback = TRUE
)

Arguments

data

A data frame, list of data frames, or grouped data frame.

method

Character; the canonical method name.

worker_args

Named list of method-specific arguments passed to the method's worker in kinetics_workers.

nirs_quo, time_quo

Quosures of the caller's nirs_channels and time_channel arguments, captured in the method frame.

group_intervals

"ensemble" or a list() of sample index vectors; see split_kinetics_groups().

zero_time

Logical; if TRUE, rebases each interval's time_channel to start from zero, shifting interval_times metadata by the same offset.

verbose

Logical. TRUE (default) will display, and FALSE will silence warnings and information messages helpful for troubleshooting. Global default can be set via options(mnirs.verbose = FALSE).

call

The matched call from the user-facing method.

env

The call recorded for condition reporting.

fallback

Logical; resolve the method's fallback chain in kinetics_fallbacks per channel (see analyse_kinetics_channels()).

Value

An "mnirs_kinetics" object from build_kinetics_results().


mnirs documentation built on Sept. 13, 2026, 1:06 a.m.