process_ankom: Process ANKOM RF Data

View source: R/process_ankom.R

process_ankomR Documentation

Process ANKOM RF Data

Description

Converts raw ANKOM RF output into a standardized dataset suitable for rumenGP analyses.

Usage

process_ankom(
  raw_data,
  metadata = NULL,
  headspace_ml = 210,
  temperature_c = 39,
  zero_negative_pressure = FALSE
)

Arguments

raw_data

Raw ANKOM data table.

metadata

Metadata table.

headspace_ml

Bottle headspace volume (mL).

temperature_c

Incubation temperature (°C).

zero_negative_pressure

Logical. If TRUE, negative pressure values are converted to zero before gas-volume calculations.

Details

The function:

  • Merges ANKOM measurements with metadata

  • Removes Head 0 (the ANKOM receiver/base station)

  • Converts pressure measurements to gas volumes

  • Applies headspace and temperature corrections

  • Produces a standardized rumen_gp object

Head 0 is reserved by the ANKOM RF system as the receiver/base station and is automatically removed during processing.

Value

A rumen_gp object containing:

  • Time points

  • Gas production values

  • Bottle identifiers

  • Treatment assignments

  • Additional metadata

See Also

read_ankom, read_metadata, as_rumen_gp, plot_gp

Examples


files <- example_data()

raw_data <- read_ankom(
  files$ankom
)

metadata <- read_metadata(
  files$metadata
)

gp <- process_ankom(
  raw_data,
  metadata,
  headspace_ml = 210,
  temperature_c = 39
)

head(gp)

# Alternative behavior:
# convert negative pressures to zero
gp_zeroed <- process_ankom(
  raw_data,
  metadata,
  headspace_ml = 210,
  temperature_c = 39,
  zero_negative_pressure = TRUE
)

head(gp_zeroed)


rumenGP documentation built on Oct. 2, 2026, 5:09 p.m.