View source: R/create_taxon_ancillary.R
create_taxon_ancillary | R Documentation |
Create the taxon_ancillary table
create_taxon_ancillary(
L0_flat,
taxon_id,
datetime = NULL,
variable_name,
unit = NULL,
author = NULL
)
L0_flat |
(tbl_df, tbl, data.frame) The fully joined source L0 dataset, in "flat" format (see details). |
taxon_id |
(character) Column in |
datetime |
(character) An optional in |
variable_name |
(character) Columns in |
unit |
(character) An optional column in |
author |
(character) An optional column in |
This function collects specified columns from L0_flat
, converts into long (attribute-value) form by gathering variable_name
. Regular expression matching joins unit
to any associated variable_name
and is listed in the resulting table's "unit" column.
"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.
(tbl_df, tbl, data.frame) The taxon_ancillary table.
flat <- ants_L0_flat
taxon_ancillary <- create_taxon_ancillary(
L0_flat = flat,
taxon_id = "taxon_id",
variable_name = c(
"subfamily", "hl", "rel", "rll", "colony.size",
"feeding.preference", "nest.substrate", "primary.habitat",
"secondary.habitat", "seed.disperser", "slavemaker.sp",
"behavior", "biogeographic.affinity", "source"),
unit = c("unit_hl", "unit_rel", "unit_rll"))
taxon_ancillary
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.