filter_by_importance: Filter out diet data below a given importance threshold

Description Usage Arguments Value See Also Examples

View source: R/filter.R

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

1
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

1
2
3
4
5
## Not run: 
  x <- so_isotopes()
  x %>% filter_by_importance(0.1)

## End(Not run)

SCAR/sohungry documentation built on Nov. 7, 2018, 12:24 p.m.