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

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

Examples

if (FALSE) { x <- so_diet() x %>% filter_by_importance(0.1) }