% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ops.R
\name{ops_withdraw}
\alias{ops_withdraw}
\title{Exclude withdrawn participants from a dataset}
\usage{
ops_withdraw(data, file, eid_col = "eid", verbose = TRUE)
}
\arguments{
\item{data}{A data.frame or data.table containing a participant ID column.}

\item{file}{(character) Path to the UKB withdrawal CSV file. The file must
be a single-column, \strong{header-free} CSV as supplied by UK Biobank
(e.g. \code{w854944_20260310.csv}).}

\item{eid_col}{(character) Name of the participant ID column in \code{data}.
Default \code{"eid"}.}

\item{verbose}{(logical) Print the CLI report. Default \code{TRUE}.}
}
\value{
A data.table with withdrawn participants removed.
}
\description{
Reads a UK Biobank withdrawal list (a headerless single-column CSV of
anonymised participant IDs) and removes the corresponding rows from
\code{data}. A pair of \code{\link[=ops_snapshot]{ops_snapshot()}} calls is made automatically so the
before/after row counts are recorded in the session snapshot history.
}
\examples{
dt <- ops_toy(n = 100)
withdraw_file <- tempfile(fileext = ".csv")
writeLines(as.character(dt$eid[1:5]), withdraw_file)
dt <- ops_withdraw(dt, file = withdraw_file)
}
