plot_fit: Plot Fitted Model

View source: R/plot_fit.R

plot_fitR Documentation

Plot Fitted Model

Description

Plots observed and predicted gas production values for an individual bottle.

Usage

plot_fit(fit, head = NULL)

Arguments

fit

A fitted model object.

head

Optional Head identifier. If omitted and only one bottle is present, that bottle is plotted automatically.

Details

Observed measurements are displayed alongside the fitted model curve, allowing visual assessment of model performance.

This visualization is useful for:

  • Evaluating model fit

  • Identifying systematic deviations

  • Inspecting individual fermentation profiles

  • Comparing observed and predicted values

Value

A ggplot2 object.

See Also

plot_all_fits, plot_residuals, fit_groot

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
)

fit <- fit_groot(
  gp
)

# Plot a specific bottle
plot_fit(
  fit,
  head = 1
)


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