Deprecated in favour of the simpler workflow involving make_taxonomy then bin_taxa (along with other bins, say, geographic and temporal). Required attributes are then added to each taxa; context and/or taxa + context before reducing to distinct context and associated attributes.
Usage
filter_taxa(
df,
taxa_col = "original_name",
context,
extra_cols = NULL,
required_rank = "species",
do_cov = FALSE,
do_life = FALSE,
lucov = NULL,
lulife = NULL,
taxonomy
)
Arguments
- df
Dataframe to clean, filter and tidy with respect to taxonomy.
- taxa_col
Character. Name of column with taxa.
- context
Character. Name of columns defining context.
- extra_cols
Character. Name of any extra columns to keep.
- required_rank
Character. Default is 'species'. What level of the taxonomic hierarchy is required for results. Records above this level are filtered.
- do_cov
Logical. Should cover (needs to be supplied in df) be appended to output.
- do_life
Logical. Should lifeform (needs to be supplied in df) be appended to output.
- lucov
Dataframe lookup for cover.
- lulife
Dataframe lookup for lifeform.
- taxonomy
list with (at least) named elements
lutaxa
andtaxonomy
. Usually resulting from call toenvClean::make_taxonomy()
.- do_ind
Logical. Should ind (needs to be supplied in df) be appended to output.