If a TYPE field exists, this function checks for any TYPE entries that aren't allowable per dbGaP instructions.
Arguments
- DD.dict
Data dictionary.
- verbose
When TRUE, the function prints the Message out, as well as more detailed diagnostic information.
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 (List of illegal TYPE entries).
Details
Allowable entries in TYPE column include: integer; decimal; encoded value; or string. For mixed values, list all types present using commas to separate (e.g., integer, encoded value).
Examples
data(ExampleB)
type_check(DD.dict.B)
#> $Message
#> [1] "Passed: All TYPE entries found are accepted by dbGaP per submission instructions."
#>
#> $Information
#> [1] "integer" "integer, encoded value" "decimal, encoded value"
#>
print(type_check(DD.dict.B, verbose=FALSE))
#> # A tibble: 1 × 5
#> Time Function Status Message Information
#> <dttm> <chr> <chr> <chr> <named lis>
#> 1 2023-09-27 11:01:21 type_check Passed Passed: All TYPE entries fo… <chr [3]>