guess_time_only function

Guess time variables based on naming pattern

Guess time variables based on naming pattern

This is for repairing data with time variables with appended "1970-01-01"

guess_time_only( data, validate.time = FALSE, time.var.sel.pos = "[Tt]i[d(me)]", time.var.sel.neg = "[Dd]at[eo]" )

Arguments

  • data: data.frame or tibble
  • validate.time: Flag to validate guessed time columns
  • time.var.sel.pos: Positive selection regex string passed to gues_time_only_filter() as sel.pos.
  • time.var.sel.neg: Negative selection regex string passed to gues_time_only_filter() as sel.neg.

Returns

data.frame or tibble

Examples

redcapcast_data |> guess_time_only(validate.time = TRUE)