Skip to contents

Loading UK Biobank data

Make a data dictionary and optionally select columns to read into R +/- labels.

make_data_dict()
Generate a UK Biobank data dictionary
read_ukb()
Read a UK Biobank main dataset file

Tidy clinical events data

Convert clinical events data from multiple sources to a standardised long format table

tidy_clinical_events()
Tidy clinical events data from a UK Biobank main dataset
make_clinical_events_db()
Create a SQLite database with a clinical_events table
clinical_events_sources()
Details for UK Biobank clinical events data

Extract phenotypes

Identify individuals with certain phenotypes based on clinical codes

extract_phenotypes()
Extract phenotypes from clinical events data
example_clinical_codes()
Generate an example data frame of clinical codes for diabetes
validate_clinical_codes()
Validate a clinical codes data frame
mutate_age_at_event_cols()
Mutate age at event columns

Summarise numerical variables

Summarise all or a selection of continuous variables

summarise_numerical_variables()
Summarise numerical variables

Derived variables

Commonly required derived variables

derive_dob()
Derive an estimated participant date of birth
derive_ethnic_background_simplified()
Derive simplified ethnic background

Utilites

Miscellaneous general utility functions

get_ukb_data_dict()
Get the UK Biobank data dictionary
get_ukb_codings()
Get the UK Biobank codings file
db_tables_to_list()
Make a named list of tbl_dbi objects from a DBIConnection object

Dummy data

Dummy UKB datasets, data dictionary and data codings

get_ukb_dummy()
Dummy UK Biobank data