Because of the challenge and difficulty involved in wrangling and tidying the medication data, separate documentation and functions were created to deal with the data. Most of these functions use pattern searching based on grep using perl regular expression (regex) syntax. These pattern searching syntax is very challenging to use and create, so please look up how to use them if you are wanting to add another medication use to the dataset.

clean_meds()

meds_general_types(.data)

clean_meds_usage(data)

clean_meds_lipids_chol(data)

clean_meds_blood_pressure(data)

clean_meds_blood_glucose(data)

clean_meds_diabetes(data)

Arguments

data

The medication dataset.

base

The base medication data to link to the rest of PROMISE.

Value

Tidied dataset of medication use.

Outputs a data.frame

Outputs data with lipid and cholesterol medication use.

Outputs data with blood pressure meds use.

Outputs data with blood glucose meds.

Outputs data with diabetes meds.