filter_by_importance: Filter out diet data below a given importance threshold

View source: R/filter.R

filter_by_importanceR Documentation

Filter out diet data below a given importance threshold

Description

A diet record is retained if any of the importance measures are above the threshold. Records with all-NA importance values will be removed.

Usage

filter_by_importance(x, threshold, which_measures = "any")

Arguments

x

data.frame: diet data, as returned by so_diet

threshold

numeric: remove entries below this threshold

which_measures

string: one or more of "fraction_diet_by_weight", "fraction_diet_by_prey_items", "fraction_occurrence", or "any" (shorthand for all three)

Value

data.frame

See Also

so_diet, replace_by_importance

Examples

## Not run: 
  x <- so_diet()
  x %>% filter_by_importance(0.1)

## End(Not run)


SCAR/sohungry documentation built on Nov. 2, 2023, 4:19 p.m.