Functions available for use

Only these functions are loaded when using PROMISE.data. All the other functions are internal, but have documentation to describe them.

PROMISE

The final, master dataset for the PROMISE cohort

export()

This is just a thin wrapper around readr::write_excel_csv.

view_manual()

View the various PROMISE manuals.

combine_datasets()

Combine multiple datasets together into one, merged dataset. Merges based on SID and VN columns.

Package description

PROMISE-package

PROMISE.data contains the code, manuals, and data for the PROMISE cohort.

Internal functions: Generating Rda datasets

Save individual datasets as accessible Rda objects and merging them into a single dataset.

merge_datasets()

Merge datasets together

generate_datasets()

(Re-)Generate the individual datasets from PROMISE.

generate_promise()

Cleans, adds to, and processes the combined dataset into the final saved PROMISE dataset.

Internal functions: Wrangling individual datasets

Prepare and clean the individual datasets into tidy dataframes. These functions are used before saving the dataset as an accessible Rda object.

clean_bia()

Imports raw BIA data and wrangles it into a tidy format.

clean_bloodwork()

Import raw bloodwork data and wrangle it into a tidy format.

clean_canoe()

Imports raw Canoe data and wrangles it into tidy format

clean_dhq()

Import DHQ data and wrangle it into a tidy format.

clean_diabetes_status()

Import raw diabetes status data and wrangling into tidy format.

clean_dxa()

Imports the raw DXA data and wrangles into a tidy format.

clean_fattyacids()

Import fatty acid raw datafiles and wrangle it into a tidy format

clean_form010()

Import screening data from Form 1.0 (form010) and wrangle it into a tidy format

clean_form012dx()

Import family history of disease data from Form 1.2 (form012dx) and wrangle it into a tidy format

clean_form012e()

Import medical history and anthropometric data from Form 1.2 (form012e) and wrangle it into a tidy format

clean_form012()

Merge form012dx and form012e datasets

clean_form014()

Import raw data from Form 1.4 (form014) and wrangle into a tidy format.

clean_form015()

Import bloodwork data from Form 1.5 (form015) and wrangle it into a tidy format.

clean_homa2()

Homa2-IR, HOMA %B (beta cell function) and HOMA %S (insulin sensitivity) values for subjects with fasting insulin and glucose measures (n=1749). Calculated using HOMA2 excel spreadsheet available online.

clean_meds() meds_general_types() clean_meds_usage() clean_meds_lipids_chol() clean_meds_blood_pressure() clean_meds_blood_glucose() clean_meds_diabetes()

Convert medication data into tidy format.

clean_msd()

Merge all MSD protein data (adiponectin, TNFa, IL6, and YKL40). Code extracts and cleans raw data from files.

clean_ogtt()

Imports raw OGTT data and wrangles it into a tidy format.

clean_phys_act()

Calculates the MET (metabolic equivalents) from the physical activity questionnaire.

clean_udbp()

Imports raw UDBP data and wrangles it into a tidy format.

clean_vitamin_d()

Imports raw vitamin D data and wrangles it into a tidy format.

clean_wbc()

Imports raw WBC data and wrangles it into a tidy format.

months_from_baseline()

Calculate months and years from baseline visit.

visit_info()

Visit date, drop reason, visit comments.

Internal functions: Calculating measures

These functions are used to calculate various measures such as MET (physical activity) and age.

add_single_variable() add_age() add_dysglycemia() add_outcomes_ir() add_outcomes_bcf() add_outcomes_ic() add_total_fa() add_metabolic_syndrome() add_ethnicity() add_bmi() add_map()

Add variables to the merged dataset.

calc_job_met()

Calculate job-base MET.

calc_pa_met()

Calculate general (life) physical activity MET.

calc_total_met()

Calculate total MET (metabolic equivalents) for physical activity.

calculate_age()

Calculate age from birth date to visit date.

Internal functions: Minor fixer functions

fix_job_times()

Fix job working times that are almost impossible.

tidy_msd()

Clean up the imported raw MSD datasets and keep what is important (there is a lot of unnecessary data inside the MSD raw files).

Internal functions: Importing specific datasets

These functions import specific raw datasets that need special wrangling not available from the PROMISE.scrub package, such as from the MSD machine.

import_csv_msd()

Import the raw datasets obtained from the MSD analyzers for the various proteins.

import_dxa()

Import raw DXA data files.

import_fattyacid()

General function for fatty acid datasets only.

import_txt_cd163()

Import one dataset from the CD163 measurement (it's in a tab delimited format).

import_txt_multiple_cd163()

Import multiple CD163 datasets and clean them up (kind of necessary to clean up at the same time as importing).

Internal functions: Incomplete functions

dhqextra()

Import DHQ additional milk and cheese data from raw scanned forms and wrangle it into a tidy format

cd163_signals()

Export 450nm and 570nm output from CD163 runs.