Small helper function to extract the latest date-time from a data frame or
a list of data frames.
Usage
get_max_time(data, col_name = "edit_date_time")
Arguments
- data
data to look for the latest date time.
Can be a data frame or a list of data frames.
- col_name
character vector with the column name in which
to search for the date object.
Value
A date-time object of length 1.
Examples
# example data:
dfs <- lapply(1:10, \(x){data.frame(
"edit_date_time" = sample(seq(as.Date('1999/01/01'), as.Date('2000/01/01'), by="day"), 12)
)})
get_max_time(dfs, "edit_date_time")
#> [1] "1999-12-31 UTC"