Checks for duplicated names within a UKB dataset

ukb_df_duplicated_name(data)

Arguments

data

A UKB dataset created with ukb_df.

Value

Returns a named list of numeric vectors, one for each duplicated variable name. The numeric vectors contain the column indices of duplicates.

Details

Duplicates *within* a UKB dataset are unlikely to occur, however, ukb_df creates variable names by combining a snake_case descriptor with the variable's **index** and **array**. If an index_array combination is incorrectly repeated in the original UKB data, this will result in a duplicated variable name. . See vignette(topic = "explore-ukb-data", package = "ukbtools") for further details.