Constructs a standardized data object for use with bdsreader-compatible tools.
Returns a list with personal and measurement data. If psn
or xyz
are not provided,
default templates are created.
init_bdsreader(psn = NULL, xyz = NULL)
A list of class "bdsreader"
with two elements:
A tibble with one row per subject. See details below.
A tibble in long format with age-based measurements. See details below.
psn
Integer. Unique subject ID. Set to -1 if not provided. Code id == 0 is the current target child
Character. Child name or alias.
Date. Date of birth of the child.
Date. Date of birth of the mother.
Date. Date of birth of the father.
Character. Data source or study identifier.
Character. Donor or provenance code.
Character. Sex of the child (e.g., "male", "female").
Numeric. Gestational age in days.
Numeric. Gestational age in completed weeks.
Numeric. Smoking status during pregnancy (0 or 1).
Numeric. Birth weight in grams.
Numeric. Height of mother in centimeters.
Numeric. Height of father in centimeters.
Numeric. Age of mother at birth in years.
Character. Ethnicity code.
Character. Postal code (NL-style 4-digit format).
Integer. Birth land biological father (landcode).
Integer. Birth land biological mother (landcode).
Integer. Educational level of father.
Integer. Educational level of mother.
Integer. Parity (number of previous children).
xyz
Numeric. Age at measurement (e.g., in days or months).
Character. Name of the x-variable (typically "age").
Character. Name of the measurement variable (e.g., "hgt").
Character. Name of the z-score variable. (e.g. "hgt_z")
Character. Reference standard for z-score (e.g., "nl_2010_hgt_male_").
Numeric. Value of the x-variable.
Numeric. Observed measurement value.
Numeric. Standardized z-score.
bds <- init_bdsreader()
validate_bdsreader(bds)
#> [1] TRUE