Skip to contents

Retrieves a study-level attribute from the specification.

Usage

spec_study(spec, attribute)

Arguments

spec

A herald_spec object.

attribute

The attribute name to retrieve (e.g., "StudyName").

Value

The attribute value as a character string, or NULL if not found.

Examples

spec <- herald_spec(
  ds_spec = data.frame(dataset = "DM", label = "Demographics",
                       stringsAsFactors = FALSE),
  var_spec = data.frame(dataset = "DM", variable = "STUDYID",
                        stringsAsFactors = FALSE),
  study = data.frame(attribute = "StudyName", value = "STUDY-001",
                     stringsAsFactors = FALSE)
)
spec_study(spec, "StudyName")
#> [1] "STUDY-001"