Inserts a column with centre name, ukb_centre, into the supplied data.frame. Useful if your UKB centre variable uk_biobank_assessment_centre_0_0 has not been populated with named levels.

ukb_centre(data, centre.var = "^uk_biobank_assessment_centre.*0_0")

Arguments

data

A UKB dataset created with ukb_df.

centre.var

The UKB column containing numerically coded assessment centre. The default is a regular expression "^uk_biobank_assessment_centre.*0_0".

Value

A dataframe with an additional column ukb_centre - UKB assessment centre names