Learn R Programming

isotracer (version 1.1.8)

filter_by_group: Filter a tibble based on the "group" column

Description

This function can be used to filter any tibble (e.g. network model object) that has a "group" column. See the Examples for more details and syntax.

Usage

filter_by_group(.data, ...)

Value

A tibble similar to the input object, but with rows filtered based on ....

Arguments

.data

A tibble that has a `group` column, such as a `networkModel` object.

...

Conditional expressions for filtering (see the Examples).

Examples

Run this code
trini_mod
trini_mod$group
groups(trini_mod)
filter_by_group(trini_mod, stream == "LL", transect == "transect.1")
filter_by_group(trini_mod, transect == "transect.1")
if (FALSE) {
# The code below would raise an error because there is no "color" grouping variable.
filter_by_group(trini_mod, color == "red")
}

Run the code above in your browser using DataLab