validate_table_attributes: Validate the table attributes template (attributes_*.txt)

View source: R/validate_templates.R

validate_table_attributesR Documentation

Validate the table attributes template (attributes_*.txt)

Description

Validate the table attributes template (attributes_*.txt)

Usage

validate_table_attributes(x)

Arguments

x

(named list) The data and metadata object returned by template_arguments().

Details

Checks performed on each data tables attribute metadata:

  • Attribute metadata is present for each data table

  • Template columns are correctly named

  • All columns of a table are listed as attributes

  • All columns of a table are listed in the same order as attributes

  • All attributes are defined

  • All attributes are assigned a class

  • Classes are of the expected type

  • Numeric classes are assigned units

  • All units are from the standard dictionary or defined

  • Date classed attributes have a format specifier

  • Date and time format specifiers are not empty

  • Only one missing value code is allowed per attribute

  • Missing value code is not a blank/white space

  • All missing value codes are defined

  • False "numeric" attributes are reclassified as "character"

Value

issues

(character) Descriptions of issues found in the template grouped by "required" and "optional" criteria.

x

(named list) If "required" issues are found, then the template is removed along with the corresponding data table.


EDIorg/emlAssemblyLine documentation built on Nov. 4, 2022, 11:59 p.m.