Learn R Programming

lab2clean (version 2.0.0)

Automation and Standardization of Cleaning Clinical Laboratory Data

Description

Navigating the shift of clinical laboratory data from primary everyday clinical use to secondary research purposes presents a significant challenge. Given the substantial time and expertise required for lab data pre-processing and cleaning and the lack of all-in-one tools tailored for this need, we developed our algorithm 'lab2clean' as an open-source R-package. 'lab2clean' package is set to automate and standardize the intricate process of cleaning clinical laboratory results. With a keen focus on improving the data quality of laboratory result values and units, our goal is to equip researchers with a straightforward, plug-and-play tool, making it smoother for them to unlock the true potential of clinical laboratory data in clinical research and clinical machine learning (ML) model development. Functions to clean & validate result values (Version 1.0) are described in detail in 'Zayed et al. (2024)' . Functions to standardize & harmonize result units (added in Version 2.0) are described in detail in 'Zayed et al. (2025)' .

Copy Link

Version

Install

install.packages('lab2clean')

Monthly Downloads

222

Version

2.0.0

License

GPL (>= 3)

Maintainer

Ahmed Zayed

Last Published

October 4th, 2025

Functions in lab2clean (2.0.0)

validate_lab_result

Validate Quantitative Laboratory Result Values
parseUnit

Parse a UCUM unit string
loinc_reference_unit_v1

Data for the Reference Harmonized Units for LOINC Groups
parsed_units_df

Data for the parsed UCUM units
reportable_interval

Data for the reportable interval
RWD_units_to_UCUM_V2

Data for the RWD units mapped to standard UCUM-valid units
harmonize_lab_unit

Harmonizing Laboratory Units of Measurement through Unit Conversion
clean_lab_result

Clean and Standardize Laboratory Result Values
standardize_lab_unit

Clean and Standardize Formats of Laboratory Units of Measurement
Function_3_dummy

Dummy Data for demonstrating function 3
Function_4_dummy

Dummy Data for demonstrating function 4
annotable_strings

Annotable Strings for Unit Standardization
common_words

Data for the common words
logic_rules

Data for the logic rules
Function_1_dummy

Dummy Data for demonstrating function 1
Function_2_dummy

Dummy Data for demonstrating function 2