A database can add columns of its own to the traits table, for fields recorded for all or most of its records, such as the kind of specimen measured. additional_traits_table_fields, in the metadata block of the database's config/metadata.yml, names each column and describes it:

util_additional_traits_table_fields(resource_metadata)

Arguments

resource_metadata

The metadata block of the database's config/metadata.yml, as passed to dataset_process()

Value

Named character vector of descriptions, named by column, or an empty character vector when the setting is absent

Details

additional_traits_table_fields:
  specimen_type: The kind of specimen the value was measured on.

A dataset sets each column the way it sets measurement_remarks: in the dataset block of its metadata.yml, or on a trait's entry in traits, as either a fixed value or the name of a column of data.csv. A dataset that sets neither leaves the column empty. The columns follow the schema's own, in the order given, so a database without the setting is built exactly as before.

A name must start with a letter and hold only letters, digits and underscores. It may not be one the schema already uses for a column of any of the database's tables, which functions such as traits.use::join_taxa() add to the traits table, or for a field of a dataset's metadata.yml; nor one of traits_working_columns, which the build adds to the traits table while processing it and would overwrite or drop. Names are checked against the schema shipped with traits.build rather than the one being built with, so a schema the columns have already been added to (see util_schema_add_traits_table_fields()) can be passed again.