validate_bdsreader: Validate a bdsreader object

View source: R/validate_bdsreader.R

validate_bdsreaderR Documentation

Validate a bdsreader object

Description

Checks structure, required columns, and column types for both psn and xyz.

Usage

validate_bdsreader(obj, strict = FALSE)

Arguments

obj

An object of class bdsreader.

strict

Logical. If TRUE, stops on first error. If FALSE, returns a character vector of issues.

Value

TRUE if valid, otherwise a vector of issues or an error.

Examples

bds <- init_bdsreader()
validate_bdsreader(bds)  # TRUE

# Corrupt type
bds$psn$gad <- as.character(bds$psn$gad)
validate_bdsreader(bds)

growthcharts/bdsreader documentation built on June 9, 2025, 3:37 a.m.