filter_by_name | R Documentation |
A convenience function that matches on the species and/or group names.
filter_by_predator_name
is a convenience shorthand for filter_by_name(...,name_type="predator")
filter_by_prey_name
is a convenience shorthand for filter_by_name(...,name_type="prey")
filter_by_name(x, name, name_type)
filter_by_predator_name(x, name)
filter_by_prey_name(x, name)
x |
data.frame: diet data as returned by e.g. |
name |
character: vector of one or more names to match on |
name_type |
string: one of "predator", "prey", "predatorprey" (to match on either predator names or prey names), or "taxon". If missing will default to predator names for diet data, and taxon names for isotope data |
data.frame
so_diet
, so_isotopes
## Not run:
x <- so_isotopes()
x %>% filter_by_name(c("Electrona", "Gymnoscopelus"), "taxon")
x <- so_diet()
x %>% filter_by_name("Electrona carlsbergi", name_type = "predator")
## equivalent to
x %>% filter_by_predator_name("Electrona carlsbergi")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.