get_ukb_codings: Get the UK Biobank codings file

View source: R/utils.R

get_ukb_codingsR Documentation

Get the UK Biobank codings file

Description

Reads the UK Biobank codings file into R with all columns as type character.

Usage

get_ukb_codings(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_CODINGS (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_Codings.tsv", path_only = TRUE)
)

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