Skip to contents

This function creates a bipod object for Bayesian inference of population dynamics. It takes in a data frame of population counts, a sample name, and optional breakpoints to define groups within the data.

Usage

init(counts, sample, break_points = NULL)

Arguments

counts

A data frame with two columns:

  • time: Numeric or integer values representing the time steps at which population counts were recorded.

  • count: Integer values representing the population count at each time step.

sample

A character string specifying the name of the sample. This name is stored in the metadata of the resulting biPOD object.

break_points

A numeric vector specifying the breakpoints that define changes in the population dynamics. If provided, these breakpoints are used to group the time steps. If NULL, no grouping is applied. (default is NULL)

Value

A bipod object of class bipod, which includes:

  • A metadata list containing the sample name and breakpoints (if provided).

  • A counts data frame with an additional group column, which indicates the grouping of time steps based on the provided breakpoints.

Details

Initializes a biPOD object from a data frame containing population counts at different time points, along with a sample name and optional breakpoints.