Checks structure, required columns, and column types for both psn
and xyz
.
validate_bdsreader(obj, strict = FALSE)
TRUE if valid, otherwise a vector of issues or an error.
bds <- init_bdsreader()
validate_bdsreader(bds) # TRUE
#> [1] TRUE
# Corrupt type
bds$psn$gad <- as.character(bds$psn$gad)
validate_bdsreader(bds)
#> [1] "Column 'gad' in 'psn' is of type character, expected numeric"