Code and codelists for "Cohort studies on 71 different adverse health outcomes among people with atopic eczema in UK primary care data"
- Open the R console and call
renv::restore()
to install the required R packages. - Provide a
paths.R
file in thepaths/
folder (see README) - Call
library(targets)
andtar_make()
to run the pipeline.
- Call
tar_read(target)
to retrieve a specified target. - Call
tar_visnetwork(targets_only = TRUE)
to visualise the pipeline.
No real data is provided in this repository. CPRD Aurum data is provided via a 2-step process: First, the codes from the relevant codelist need to be provided to define a cohort of exposed individuals (the files are created as [...]_codes_for_define.txt). Second, a list of patids needs to be provided to extract all data for these individuals (the list of patids is created as patids_for_extract.txt).
With dummy data the pipeline takes approximately 5 minutes to complete on a normal (ca 2023) desktop or laptop computer. With real CPRD Aurum data, the pipeline may take more than 1 week to complete when branches are not run in parallel. Approximately 64 GB of RAM are required.
File | Purpose |
---|---|
_targets.R | Declares the targets pipeline. |
R/ | Contains R scripts with functions to be used in the pipeline. |
codelists/ | Contains all codelists (and some that were not used). |
dummy_data/ | When the pipeline is run, dummy data will be placed here. |
output/ | When the pipeline is run, outputs will be placed here. |
sensitive_output/ | When the pipeline is run, sensitive outputs will be placed here (lists for CPRD Aurum define and extract). |
paths/ | To run the pipeline, the paths.R file needs to be placed here (see README). |
renv.lock | The renv lock file that specifies all package versions. |