read_caliber_raw | R Documentation |
Reads a local copy of the CALIBER repository into R. All CALIBER codes are read into a named list containing 3 data frames: primary care Read 2, secondary care ICD10 and secondary care OPCS4 codes.
read_caliber_raw(caliber_dir_path, overlapping_disease_categories = "error")
caliber_dir_path |
Path to a locally downloaded copy of the CALIBER github repository. |
overlapping_disease_categories |
If 'error' (default), raises an error if any overlapping disease categories are present after mapping. Specify 'warning' to raise a warning instead. |
The directory supplied to caliber_dir_path
is expected to contain
subdirectories primary_care
and secondary_care
, each of which contains
csv files with clinical code lists.
Note also that:
Medcodes are dropped
Minimal reformatting is performed so that primary and secondary care codes may be combined into a single data frame
A named list of data frames.
Other CALIBER:
default_overlapping_disease_categories_csv()
,
download_caliber_repo()
,
get_caliber_categories_mapping()
,
reformat_caliber_for_ukb()
# read local copy of CALIBER repository into a named list. Note that
# (i) Medcodes are dropped and (ii) minimal reformatting is performed so that
# primary and secondary care codes may be combined into a single data frame
caliber_raw <- read_caliber_raw(dummy_caliber_dir_path())
caliber_raw
# combine into a single data frame using dplyr
dplyr::bind_rows(caliber_raw)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.