subset.STOMdiet: Sub-setting a STOMdiet object.

View source: R/STOMdiet.R

subset.STOMdietR Documentation

Sub-setting a STOMdiet object.

Description

General method for sub-setting a STOMdiet object.

Usage

## S3 method for class 'STOMdiet'
subset(x, ..., na_rm = TRUE)

Arguments

x

Take subset of this dataset.

...

One or more subset criteria.

na_rm

Delete missing values.

Details

A STOMdiet object contains two kinds of information:

  1. Between predator information (contained in component PRED)

  2. Within prey information (contained in component PREY)

This method can subset over both kinds of information - at once. The functionality is achieved by matching each of the subset critera to the appropriate data component. When a match is found the subset is performed on the component and the subsetting is continued to the next subset criteria. The number of subset critera can be arbitrary and is given through the ... argument. Code is copied from the DATRAS package

Value

The reduced dataset of class STOMdiet.


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