Changelog
Source:NEWS.md
HealthMarkers 0.1.2
CRAN release: 2026-05-19
New features
hm_normalize()— post-computation normalisation helper (new function). Apply z-score, rank-based inverse-normal transform (Rankit), min-max, or robust median/MAD scaling to any marker output data frame. Usecolsto target specific columns andskip_colsto protect covariates (e.g. age, BMI) from being rescaled. This covers domain functions whose internalnormalizeargument currently has no effect (glycemic_markers(),lipid_markers(),renal_markers(), etc.). See?hm_normalize.-
Multi-biobank column inference (major). The internal synonym dictionary (
.hm_default_col_patterns_exact()) now recognises column-naming conventions from 15+ major cohort studies and biobanks for all primary analytes:-
UK Biobank —
_0_0/_1_0field naming (e.g.glucose_0_0,creatinine_0_0,vitamin_d_0_0);standing_height,25OHD. -
NHANES — LBXS, LBDS, BPX, URX prefix variables (e.g.
LBXGLU,LBXSCH,BPXSY1,URXUMA). -
Danish national registers / EHR (LABKA/OPEN) — NPU codes (
NPU01994for creatinine,NPU01567for cholesterol,NPU03609for haemoglobin, etc.) and Danish clinical labels (kreatinin,kolesterol,blodsukker,leukocytter,trombocytter,d_vitamin). -
HUNT Study and Tromsø Study (Norway) — Norwegian-language terms (
blodsukkerfasting,systolisk_blodtrykk,triglyserider,karbamid,kjonn,midjeomkrets). -
SCAPIS / TwinGene (Sweden) — Swedish-language terms (
glukos,urinsyra,leukocyter,trombocyter,kön,längd,vikt). -
FinnGen / THL Biobank (Finland) — Finnish-language terms (
glukoosi,kolesteroli,kreatiniini,hemoglobiini,sukupuoli,virtsahappo,leukosyytit,ferritiini,D_vitamiini). -
Estonian Biobank (EstBB) — Estonian terms (
glukoos,kolesterool,kreatiniin,hemoglobiin,naatrium,kaalium,vanus,sugu). -
LifeLines Cohort / Rotterdam Study (Netherlands) — Dutch terms (
nuchtere_glucose,totaal_cholesterol,urinezuur,ureum,leukocyten,hemoglobine,vitamine_D,tailleomtrek). -
Generation Scotland (GS:SFHS) —
SBP_mean,DBP_mean,genetic_sex,ethnic_group. -
All of Us / OMOP CDM — LOINC codes in
LOINC_XXXX_Xformat for all major analytes (e.g.LOINC_2345_7for fasting glucose,LOINC_2160_0for creatinine,LOINC_718_7for haemoglobin). -
NAKO / KORA (Germany) — German-language terms (
Cholesterin,Triglyzeride,Harnsäure,Harnstoff,Leukozyten,Thrombozyten).
-
UK Biobank —
Added
hm_col_report()— an interactive column-mapping diagnostic. Callhm_col_report(your_data)before running any computation to see a formatted table of which internal keys were matched to columns in your data and how (exact synonym, case-insensitive, substring, or fuzzy), plus a ready-to-pastecol_maptemplate for any unmatched keys.
The function uses a five-layer matching pipeline and returns the matched mappings invisibly so the result can be passed directly ascol_mapto any HealthMarkers function.Auto-derivation of computed inputs.
.hm_global_precompute()now automatically derives 18+ secondary columns before marker computation begins, so functions that require (e.g.)eGFR,UACR,WHR,LDL_c, orwaistno longer fail silently when only the raw inputs are present. Affected keys includeeGFR(from creatinine/age/sex via CKD-EPI),WHR(fromwaistandhip),UACR(fromu_albumin/u_creatinine),LDL_c(Friedewald from TC/HDL_c/TG),MAP,PP,BMI(from height/weight), and more.-
Expanded the internal synonym dictionary (
R/utils_infer-cols.R) for all variable groups, additionally incorporating:- Inter99 / ADDITION real phenotype dataset labels
- Common literature spellings (
TryG,TAG,TRIG,triacylglycerol;SGPT/GPT/ALAT;hsCRP/hs_CRP) - Longitudinal follow-up suffixes (
_0,_1,_3,_5) - NMR metabolomics (urine) panel, ECG markers, lifestyle covariates, and cytokine multiplex proteins.
Bug fixes
-
adiposity_sds(): fixedfn_namelookup bug that caused incorrect error messages when validation failed on non-standard column names.
Internal
- Renamed the internal verbose-message helper from
hm_col_report()tohm_fmt_col_map()to avoid a name collision with the new exported function.
HealthMarkers 0.1.1
New features
- Added
liver_fat_markers()for hepatic steatosis and fibrosis index calculation. - Added
nfl_marker()for plasma neurofilament light chain (NfL) z-score computation. - Added
impute_missing()for within-row imputation of missing biomarker values.
Bug fixes and improvements
-
pulmo_markers(): fixed column-inference logic for spirometry z-score inputs. - All marker functions: standardised verbose progress messages to emit at the
"debug"level whenverbose = FALSE, so thatgetOption("healthmarkers.verbose")controls visibility consistently across every function. - Computing-phase messages are now unconditionally emitted at
"debug"level (independent of the per-callverboseargument) inbone_markers(),ckd_stage(), andcorrected_calcium(). -
all_health_markers(): column inference is now keyed to the requested groups, falls back to regex-basedinfer_cols()when exact matches fail, and reports per-group status (including missing optional packages) in verbose summaries. - Cardiovascular risk wrappers:
cvd_risk_qrisk3()now prefers the correctly namedethnicitycolumn (typo tolerated for backward compatibility), and optional dependency errors now report the missing package name consistently. - Shared validation: lipid marker helpers now route through
hm_validate_inputs()so duplicate/empty mappings are caught uniformly.