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

find_time_col(data)

Arguments

data

a data.frame to search

Details

Column names will be searched against the following candidates

  • TIME

  • DATETIME

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, DATETIME = 2, TIME = 3, Z = 99)
lastdose:::find_time_col(data)
#> [1] "TIME"