create_taxon {ecocomDP} | R Documentation |
Create the taxon table
Description
Create the taxon table
Usage
create_taxon(
L0_flat,
taxon_id,
taxon_rank = NULL,
taxon_name,
authority_system = NULL,
authority_taxon_id = NULL
)
Arguments
L0_flat |
(tbl_df, tbl, data.frame) The fully joined source L0 dataset, in "flat" format (see details). |
taxon_id |
(character) Column in |
taxon_rank |
(character) An optional column in |
taxon_name |
(character) Column in |
authority_system |
(character) An optional column in |
authority_taxon_id |
(character) An optional column in |
Details
This function collects specified columns from L0_flat
and returns distinct rows.
Taxa listed in the taxon table, and resolved to one of the supported authority systems (i.e. ITIS, WORMS, or GBIF), will have their full taxonomic hierarchy expanded, including any common names for each level.
"flat" format refers to the fully joined source L0 dataset in "wide" form with the exception of the core observation variables, which are in "long" form (i.e. using the variable_name, value, unit columns of the observation table). This "flat" format is the "widest" an L1 ecocomDP dataset can be consistently spread due to the frequent occurrence of L0 source datasets with > 1 core observation variable.
Value
(tbl_df, tbl, data.frame) The taxon table.
Examples
flat <- ants_L0_flat
taxon <- create_taxon(
L0_flat = flat,
taxon_id = "taxon_id",
taxon_rank = "taxon_rank",
taxon_name = "taxon_name",
authority_system = "authority_system",
authority_taxon_id = "authority_taxon_id")
taxon