find_id_col: Find ID column

View source: R/lastdose.R

find_id_colR Documentation

Find ID column

Description

Search data frame names for the first matching candidate ID column name. See details.

Usage

find_id_col(data)

Arguments

data

a data.frame to search

Details

Column names will be searched against the following candidates

  • getOption("lastdose.id_col")

  • ID

  • USUBJID

  • SUBJID

  • PTNO

  • SUBJ

The first the first candidate to be matched will be returned. If there are no matches, an error is generated.

Examples

data <- data.frame(A = 1, B = 2, PTNO = 3, ID = 4, Z = 99)
lastdose:::find_id_col(data)


metrumresearchgroup/lastdose documentation built on April 12, 2025, 3:51 p.m.