subset.STOMobs: Sub-setting a STOMobs object.

View source: R/STOMobs.R

subset.STOMobsR Documentation

Sub-setting a STOMobs object.

Description

General method for sub-setting a STOMobs object.

Usage

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

Arguments

x

Take subset of this dataset.

...

One or more subset criteria.

na_rm

Discard missing values in subset criterion?

Details

A STOMobs 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 criteria 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 criteria can be arbitrary and is given through the ... argument. Code is copied from the DATRAS package

Value

subset of dataset of class STOMobs.

Examples

## Not run: subset(ns,pred_name=='Cod')

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