comorbidity_summary {UKB.COVID19} | R Documentation |
Create comorbidity summary file
Description
summarise disease history records of each individual from the hospital inpatient diagnosis data.
Usage
comorbidity_summary(
ukb.data,
hesin.file,
hesin_diag.file,
primary = FALSE,
ICD10.file,
Date.start = NULL,
Date.end = NULL
)
Arguments
ukb.data |
tab delimited UK Biobank phenotype file, containing sample qc fields (with default UKBiobank codes as column names) |
hesin.file |
Latest hospital inpatient master file. |
hesin_diag.file |
Latest hospital inpatient diagnosis file. |
primary |
TRUE: include primary diagnosis only; FALSE: include all diagnoses. |
ICD10.file |
The ICD10 code file, which is included in the package. |
Date.start |
Date, dd/mm/yyyy, select the start date of hospital inpatient record period. |
Date.end |
Date, dd/mm/yyyy, select the end date of hospital inpatient record period. |
Value
Outputs comorbidity summary table, named comorbidity_<Date.start>_<Date.end>.RData, including phenotype, non-genetic risk factors and all comorbidities, which will be used in the comorbidity association tests.
Examples
## Not run:
comorb <- comorbidity_summary(ukb.data=covid_example("sim_ukb.tab.gz"),
hesin.file=covid_example("sim_hesin.txt.gz"),
hesin_diag.file=covid_example("sim_hesin_diag.txt.gz"),
ICD10.file=covid_example("ICD10.coding19.txt.gz"),
primary = FALSE,
Date.start = "16/03/2020")
## End(Not run)