pool_data: Pool stomach contents within sample and size

View source: R/pool_sample_id_size.R

pool_dataR Documentation

Pool stomach contents within sample and size

Description

Individual stomach's data are pooled and predator information are updated for samples with the same sample_id and predator size class.

Usage

pool_data(stom)

Arguments

stom

stomach contents data of class STOMobs.

Details

The stomach contents weight by prey and prey_size class are summed for for all samples within a sample_id and predator size class. Number of stomachs are similarly added to include all stomachs. In the pooled data, the variable fish_id becomes the value of a previously assigned predator size.

Size classes of both predators and preys must have been assigned ( put_size_class_on_predator and put_size_class_on_prey ) before aggregation can be made. Technically, the fish_id is updated with the predator size pred_size

Value

stomach contents data of class STOMobs with pooled stomach contents and number of stomachs, and updated predator information.

Examples

## Not run: aggregate_within_sample(ns)

MortenVinther/FishStomachs documentation built on Feb. 14, 2025, 7:33 a.m.