verify_dictionary_structure: Verify Dictionary Structure

View source: R/metadata-template-dictionary.R

verify_dictionary_structureR Documentation

Verify Dictionary Structure

Description

Checks that no key has more than one description or columnType. Throws error if the dictionary is invalid.

Usage

verify_dictionary_structure(dictionary)

Arguments

dictionary

Dataframe with columns 'key', 'description', and 'columnType'.

Examples

## Not run: 
# Valid
dat <- data.frame(
  key = c("first_name", "first_name"),
  description = c(
    "First name of individual",
    "First name of individual"
  ),
  columnType = c("string", "string")
)
verify_dictionary_structure(dat)

# Invalid -- throws error due to descriptions of first_name
dat <- data.frame(
  key = c("first_name", "first_name"),
  description = c(
    "First name of individual",
    "Last name of individual"
  ),
  columnType = c("string", "string")
)
verify_dictionary_structure(dat)

## End(Not run)

Sage-Bionetworks/dccvalidator documentation built on May 7, 2022, 10:32 a.m.