Learn R Programming

birp (version 0.0.5)

birp_data: Create a birp_data Object from Count and Effort Matrices

Description

Constructs a 'birp_data' object from matrices of observed counts and corresponding efforts for a single method.

Usage

birp_data(counts, efforts, times, CI_groups = NULL, location_names = NULL)

Value

An object of type birp_data

Arguments

counts

A matrix of observed counts (J locations × K timepoints). Each row corresponds to a location and each column to a timepoint.

efforts

A matrix of observation effort with the same dimensions as `counts`.

times

A vector of length K specifying the timepoints.

CI_groups

A vector of length J specifying the control-intervention (CI) group for each location. Defaults to a single group (`group_1`) if not provided.

location_names

Optional names for the locations. Defaults to `"Location_1"`, `"Location_2"`, etc.

Examples

Run this code
data <- birp_data(c(10,20,30), c(100,200,300), c(1,2,5))

Run the code above in your browser using DataLab