replace_by_importance | R Documentation |
Replace diet data entries below a given importance threshold
replace_by_importance(x, threshold, replace_with = NA, which_measures = "all")
x |
data.frame: diet data, as returned by |
threshold |
numeric: replace entries below this threshold |
replace_with |
numeric: value to replace with |
which_measures |
string: one or more of "fraction_diet_by_weight", "fraction_diet_by_prey_items", "fraction_occurrence", or "all" (shorthand for all three) |
data.frame
so_diet
filter_by_importance
## Not run:
x <- so_diet()
## discard entries representing less than 10% of diet
x <- x %>% replace_by_importance(0.1)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.