% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/extract.R
\name{extract_pheno}
\alias{extract_pheno}
\title{Extract phenotype data from a UKB dataset}
\usage{
extract_pheno(field_id, dataset = NULL, timeout = 300)
}
\arguments{
\item{field_id}{(integer) Vector of UKB Field IDs to extract, e.g.
\code{c(31, 53, 22189)}. \code{eid} is always included automatically.}

\item{dataset}{(character) Dataset file name. Default: \code{NULL}
(auto-detect from project root).}

\item{timeout}{(integer) Extraction timeout in seconds. Default: \code{300}.}
}
\value{
A \code{data.table} with one row per participant. Column names
follow the \code{participant.p<id>_i<n>_a<m>} convention.
Fields not found are skipped with a warning.
}
\description{
Extracts phenotypic fields from the UKB Research Analysis Platform dataset
and returns a \code{data.table}. All instances and arrays are returned for
each requested field. Column names are kept as-is (e.g.
\code{participant.p53_i0}); use the \code{clean_} series for renaming.
}
\examples{
\dontrun{
df <- extract_pheno(c(31, 53, 21022))
df <- extract_pheno(c(31, 53, 20002), dataset = "app12345_20260101.dataset")
}
}
