Analysis code and codelists for the UK part of the study "Association of different prescribing patterns for oral corticosteroids with fracture preventive care among older adults: Population-based cohort studies in the UK and Canada"
Link to published article: https://doi.org/10.1001%2Fjamadermatol.2023.2495
- Open the R console and call
renv::restore()
to install the required R packages. - Provide a
paths.R
file in thepaths/
folder (see below for using dummy data) - Call
tar_make()
to run the pipeline.
- Call
tar_read(target)
to retrieve a specified target. - Call
tar_visnetwork(targets_only = TRUE)
to visualise the pipeline.
File | Purpose |
---|---|
_targets.R | Declares the targets pipeline. See tar_script() for details. |
R/ | Contains R scripts with functions to be used in the pipeline. |
codelists/ | Contains all codelists. |
renv.lock | The renv lock file that specifies all package versions. |
To run analyses with dummy data, provide a paths.R
file in the paths/
folder, with the following contents:
path_in <- "dummy_data/"
path_j_drive <- "dummy_data/"
path_z_drive <- "dummy_data/"
path_z_drive_linked <- "dummy_data/"
path_common_dosages <- "dummy_data/Lookups_2022_01/common_dosages.txt"