Learn R Programming

birp (version 0.0.5)

birp_data_from_data_frame: Create a 'birp_data' Object from a Data Frame or List of Data Frames

Description

Constructs a 'birp_data' object from a single data frame or a list of data frames, with one per method.

Usage

birp_data_from_data_frame(data)

Value

An object of type birp_data

Arguments

data

A data frame or a list of data frames, each representing one method. Each data frame must include the following columns: 'timepoint', 'location', 'counts', 'effort', and 'CI_group'. Each row represents a survey conducted at a specific timepoint and location, and for a specific control-intervention (CI) group.

Examples

Run this code
df <- data.frame(
  timepoint = 1:10,
  location = rep(1, 10),
  counts = runif(10, 0, 100),
  effort = rexp(10),
  CI_group = "intervention"
)
data <- birp_data_from_data_frame(df)

Run the code above in your browser using DataLab