reformat_caliber_for_ukb | R Documentation |
Reformats Read 2, ICD10 and OPCS4 CALIBER codes to match the format in UK
Biobank data, and also maps from Read 2 to Read 3, as well as from ICD10 to
ICD9. See vignette("caliber")
for further details.
reformat_caliber_for_ukb(
caliber,
all_lkps_maps,
col_filters = default_col_filters(),
overlapping_disease_categories = "error",
overlapping_disease_categories_csv = default_overlapping_disease_categories_csv()
)
caliber |
A named list of data frames, created by |
all_lkps_maps |
Either a named list of lookup and mapping tables (either
data frames or |
col_filters |
A named list where each name in the list refers to the
name of a lookup or mapping table. Each item is also a named list, where
the names refer to column names in the corresponding table, and the items
are vectors of values to filter for. For example, |
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. |
overlapping_disease_categories_csv |
File path to a csv containing codes
that are listed under more than one disease category within a disease. This
should have the same format as |
A named list of data frames.
Other CALIBER:
default_overlapping_disease_categories_csv()
,
download_caliber_repo()
,
get_caliber_categories_mapping()
,
read_caliber_raw()
# read local copy of CALIBER repository into a named list
caliber_raw <- read_caliber_raw(dummy_caliber_dir_path())
# build dummy all_lkps_maps
all_lkps_maps <- build_all_lkps_maps_dummy()
# reformat CALIBER codes for UK Biobank
caliber_ukb <- suppressWarnings(reformat_caliber_for_ukb(caliber_raw,
all_lkps_maps = all_lkps_maps
))
# view first few rows
head(caliber_ukb)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.