Learn R Programming

psHarmonize (version 0.3.6)

Creates a Harmonized Dataset Based on a Set of Instructions

Description

Functions which facilitate harmonization of data from multiple different datasets. Data harmonization involves taking data sources with differing values, creating coding instructions to create a harmonized set of values, then making those data modifications. 'psHarmonize' will assist with data modification once the harmonization instructions are written. Coding instructions are written by the user to create a "harmonization sheet". This sheet catalogs variable names, domains (e.g. clinical, behavioral, outcomes), provides R code instructions for mapping or conversion of data, specifies the variable name in the harmonized data set, and tracks notes. The package will then harmonize the source datasets according to the harmonization sheet to create a harmonized dataset. Once harmonization is finished, the package also has functions that will create descriptive statistics using 'RMarkdown'. Data Harmonization guidelines have been described by Fortier I, Raina P, Van den Heuvel ER, et al. (2017) . Additional details of our R package have been described by Stephen JJ, Carolan P, Krefman AE, et al. (2024) .

Copy Link

Version

Install

install.packages('psHarmonize')

Monthly Downloads

151

Version

0.3.6

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

John Stephen

Last Published

October 16th, 2025

Functions in psHarmonize (0.3.6)

cont_or_cat

Continuous or categorical
create_error_log_report

Error log report creation
code_modify_func

Code modify function. To be called by the harmonization function.
code_modify_func_multi

Code modify function (multiple variables). To be called by the harmonization function.
code_modify_recode

Code modify recode. To be called by harmonization function.
cohort_shell_func

Cohort sheet create. To be called by harmonization function.
create_long_dataset

Create long dataset.
cohort_a

Cohort A
summary.psHarmonize

psHarmonize summary method
reorder_factors

Reorder factors
harmonization_sheet_example

Harmonization sheet example
cohort_b

Cohort B
%>%

Pipe operator
cohort_c

Cohort C
range_function

Range function. To be called by harmonization function.
reorder_factors_df

Reorder factors data.frame
range_function_cat

Possible values for categorical variables. To be called by harmonization function.
harmonization

Harmonization Function
create_summary_report

Summary report creation
error_harmonization_sheet_example

Error harmonization sheet example