formatBio: Format and rename colnames of original biomarker dataframe

Description Usage Arguments Value Examples

View source: R/BHS.R

Description

The UK Biobank biomarker dataset column names are code names. This function recode those names to match those of the look up table (bio.dict), so basically readable names.

Usage

1
formatBio(bio.original, measurement = "first")

Arguments

bio.original

Original biomarker data frame with the first column being ID and the other columns being biomarker code and some 0 or 1 depending whether the biomarker measurement was the 'at-recruitment' measurement (0) or the one at follow-up (1)

measurement

Measurement time to retrieve. Options: "first"(Default), "second" or "both". Note: if you choose both the second biomarker colnames will be the biomarker names and ".1" appended to them, this will mess up with the BHS calculator formatting and is not currently supported. Get in touch if you want to implement that.

Value

Biomarker data frame with human readable names

Examples

1
2
3
4
library(HDATDS)
data("bio.original_example") # this loads an object called bio.original

bio = formatBio(bio.original)

lc5415/HDATDS documentation built on April 27, 2020, 6:04 a.m.