Skip to contents

Add trait and associated descriptors in trait list table

Usage

add_trait(
  new_trait = NULL,
  new_relatedterm = NULL,
  new_valuetype = NULL,
  new_maxallowedvalue = NULL,
  new_minallowedvalue = NULL,
  new_traitdescription = NULL,
  new_factorlevels = NULL,
  new_expectedunit = NULL,
  new_comments = NULL
)

Arguments

new_trait

A single string.

new_relatedterm

Optional. A single string.

new_valuetype

A single string, one of `"numeric"`, `"integer"`, `"categorical"`, `"ordinal"`, `"logical"`, `"character"`, `"table_data_liste_plots"`, or `"table_colnam"`.

new_maxallowedvalue

Optional. if valuetype is numeric, indicate the maximum allowed value

new_minallowedvalue

Optional. if valuetype is numeric, indicate the minimum allowed value

new_traitdescription

Optional. A single string.

new_factorlevels

Optional. Factor levels.

new_expectedunit

Optional. A single string.

new_comments

Optional. A single string.

Value

The function writes to a database table if confirmed by the user. The function will error if `new_trait` or `new_valuetype` are not provided, if `new_valuetype` is not one of the allowed values, or if numeric/integer value types don't match their corresponding min/max values.