get_allvarnames: Retrieve the required data fields in the ukb dataset...

View source: R/ProcessdfDefinitions.R

get_allvarnamesR Documentation

Retrieve the required data fields in the ukb dataset ukbxxxxx.tab as stated in the definition table

Description

Survey the main dataset and collect all field names that will be used as specified in definition table. These include basic data fields specified in default_ukb_fields(), which can be updated accordingly, and the fields in touchscreen columns. If metadata is supplied , it will check if these fields are present in the maindataset.

Usage

get_allvarnames(dfDefinitions_processed, dfhtml = NULL, allow_miss = TRUE)

Arguments

dfDefinitions_processed

definition table as dataframe

dfhtml

the metadata file for main dataset

Value

a list of character vectors named all_ukb_fields,nondefault_ukb_fields and default_ukb_fields

Examples

dfDefinitions_processed <- ProcessDfDefinitions(fread("definitions.tsv", colClasses = 'character', data.table = FALSE))
dfhtml <- read_ukb_metadata(fhtml)
dfDefinitions_ukb_fields <- get_allvarnames(dfDefinitions_processed,dfhtml)

niekverw/ukbpheno documentation built on Oct. 30, 2023, 9:17 p.m.