autoplot.lfq_fit: Plot lineage frequency model results

View source: R/methods-plot.R

autoplot.lfq_fitR Documentation

Plot lineage frequency model results

Description

Plot lineage frequency model results

Usage

## S3 method for class 'lfq_fit'
autoplot(
  object,
  type = c("frequency", "advantage", "trajectory", "residuals"),
  generation_time = NULL,
  ...
)

Arguments

object

An lfq_fit object.

type

Plot type: "frequency" (default), "advantage", "trajectory", or "residuals".

generation_time

Required when type = "advantage".

...

Ignored.

Value

A ggplot object.

Examples


sim <- simulate_dynamics(n_lineages = 3,
  advantages = c("A" = 1.2, "B" = 0.8), seed = 1)
fit <- fit_model(sim)
autoplot(fit)
autoplot(fit, type = "advantage", generation_time = 5)



lineagefreq documentation built on April 3, 2026, 9:09 a.m.