create_nominal: Create an Attribute in Nominal Measurement Scale

View source: R/attribute-element.R

create_nominalR Documentation

Create an Attribute in Nominal Measurement Scale

Description

Create an Attribute in Nominal Measurement Scale

Usage

create_nominal(
  domain = c("text", "enumerated"),
  definition,
  text_pattern = NULL
)

Arguments

domain

Either "text" or "enumerated".

definition

If domain is "text", provide a word description of your attribute. If the domain is "enumerated", provide a list of the attributes code definitions.

text_pattern

Optional. Only needed if applicable and the domain given is "text".

Examples

# Nominal(text):
## Not run: create_attribute(attribute_name = "site_id",
                          attribute_definition = "Site id as used in sites table",
                          measurement_scale = EMLaide::measurement_scale$nominal,
                          domain= "text",
                          definition = "Site id as used in sites table.")
## End(Not run)

# Nominal(enumerated):
code_def_1 = list(code = "yes", definition = "has been captured previously")
code_def_2 = list(code = "no", definition = "has not been captured previously")
code_definition = list(code_def_1, code_def_2)
## Not run: create_attribute(attribute_name = "Recap", 
                          attribute_definition = "Has the Turtle been captured and tagged previously",
                          measurement_scale = EMLaide::measurement_scale$nominal, 
                          domain = "enumerated",
                          definition = code_definition)
## End(Not run)

CVPIA-OSC/EMLaide documentation built on Aug. 25, 2023, 8:53 a.m.