aggregate_records: Aggregate database records

View source: R/food.records.R

aggregate_recordsR Documentation

Aggregate database records

Description

Aggregate database records according to different criteria

Usage

aggregate_records(x, ...)

Arguments

x

A record set

...

A set of database field names used in the aggregation process

Details

The default result is a three column dataframe where each row is a tuple of the form (n, p, q), where n is a snake species, p is a prey group, and q = min(predator_count, prey_count). In other words, each row is the minimum number of instances of prey group p recorded in the diet of snake taxon n. Additional database fields specified via ... augment this row tuple with more information. For example, passing "locality_adm0_name" through ... would yield tuples of the form (n, p, r, q), and the interpretation becomes the minimum number of instances of prey group p recorded in the diet of snake taxon n in country r.

Value

A dataframe summarizing counts of prey items in snake diet samples. See details for how summarization takes place.


blueraleigh/squamatabase documentation built on May 9, 2024, 11:07 a.m.