get_ukb_data_dict: Get the UK Biobank data dictionary

View source: R/utils.R

get_ukb_data_dictR Documentation

Get the UK Biobank data dictionary

Description

Reads the UK Biobank data dictionary into R with all columns as type character.

Usage

get_ukb_data_dict(path = NULL)

Arguments

path

Either NULL, or a file path. If no file exists at this path, then it will be downloaded directly from the UK Biobank data showcase website to this location when the function is first called.

Details

By default, an attempt will be made to read from a file at the path specified by an environmental variable named UKB_DATA_DICT (see vignette('ukbwranglr') for further details), or if this variable is not found then the data dictionary will be downloaded directly from the UK Biobank website to tempdir() when the function is first called.

Value

A data frame.

Examples

get_ukb_data_dict(
  get_ukb_dummy("dummy_Data_Dictionary_Showcase.tsv", path_only = TRUE)
)

rmgpanw/ukbwranglr documentation built on April 30, 2024, 7:47 a.m.