View source: R/aggregate_sample_id.R
aggregate_within_sample | R Documentation |
Stomach contents are aggregated and predator information are updated for samples with the same sample_id
and one or more fish fish_id
.
aggregate_within_sample(stom)
stom |
stomach contents data of class STOMobs. |
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, however only the total number of stomachs n_tot
is maintained.
In the aggregated data, the variable fish_id
becomes the value of 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.
stomach contents data of class STOMobs with aggregated stomach contents and number of stomachs, and updated predator information.
## Not run: aggregate_within_sample(ns)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.