pull_id.Rd
Function to extract the unique values for
subject identifiers in a data frame,
assuming a common variable name
(e.g., IDS.CHR.Subject
or ID
).
pull_id(dtf, subject = TRUE, id = NULL)
A data frame.
Logical; if TRUE
looks for common variable names for
subject identifiers (IDS.CHR.Subject,
ID, etc.). If FALSE
looks for
common variable names for screening
identifiers (IDS.CHR.Screen, etc.).
A user-defined variable name if the column with subject identifiers is not part of the commonly-used labels.
A vector of values.
dtf <- data.frame( ID = rep( 1:3, each = 3 ), X = rnorm(9) )
pull_id( dtf )
#> [1] 1 2 3