visit_cancer: Extract self-reported cancer history

Description Usage Arguments Value

Description

Extracts self-reported cancer history in a "long" format that is easier to work with than "wide" as provided by UK Biobank (NOTE: watch for type coercion of different data types). Wrapper function for visit_mult_array().

Usage

1
visit_cancer(visit_data)

Arguments

visit_data

Data frame/table with UK Biobank data. Must include fields 20001 and 20006.

Value

Data table with the following columns:

eid

UK Biobank identifier.

date

Reported date of diagnosis.

condition

Cancer type coded as in https://biobank.ctsu.ox.ac.uk/crystal/coding.cgi?id=3.

desc

Description of cancer type (added if coding data can be downloaded).

reported

Visit date at which the cancer was self-reported.


philipdarke/ukbbhelpr documentation built on Dec. 22, 2021, 7:49 a.m.