guess_time_only_filter {REDCapCAST} | R Documentation |
Try at determining which are true time only variables
Description
This is just a try at guessing data type based on data class and column names hoping for a tiny bit of naming consistency. R does not include a time-only data format natively, so the "hms" class from 'readr' is used. This has to be converted to character class before REDCap upload.
Usage
guess_time_only_filter(
data,
validate = FALSE,
sel.pos = "[Tt]i[d(me)]",
sel.neg = "[Dd]at[eo]"
)
Arguments
data |
data set |
validate |
flag to output validation data. Will output list. |
sel.pos |
Positive selection regex string |
sel.neg |
Negative selection regex string |
Value
character vector or list depending on 'validate' flag.
Examples
data <- redcapcast_data
data |> guess_time_only_filter()
data |>
guess_time_only_filter(validate = TRUE) |>
lapply(head)
[Package REDCapCAST version 24.6.1 Index]