This function checks for dbGaP required fields variable name (VARNAME
), variable description (VARDESC
), units (UNITS
), and variable value and meaning (VALUES
).
Value
Tibble, returned invisibly, containing: (1) Time (Time stamp); (2) Name (Name of the function); (3) Status (Passed/Failed); (4) Message (A copy of the message the function printed out); (5) Information (Named vector of TRUE/FALSE values alerting user if checks passed (TRUE) or failed (FALSE) for VARNAME
, VARDESC
, UNITS
, and VALUE
).
Examples
data(ExampleA)
field_check(DD.dict.A)
#> $Message
#> [1] "Passed: required fields VARNAME, VARDESC, UNITS, and VALUES present in the data dictionary."
#>
print(field_check(DD.dict.A, verbose=FALSE))
#> # A tibble: 1 × 5
#> Time Function Status Message Information
#> <dttm> <chr> <chr> <chr> <named lis>
#> 1 2025-05-01 10:29:06 field_check Passed Passed: required fields VA… <lgl [4]>