Skip to content

Commit

Permalink
fix bug causing times to be parse even when times_chron = F
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickbarks committed Dec 11, 2024
1 parent f8bdc26 commit 7e66d01
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions R/reclass.R
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,11 @@ reclass <- function(x,

# time variables
cols_time <- dict_foc[[col_field]][grepl("^time$", dict_foc$validation)]
x <- cols_reclass(x, cols_time, parse_redcap_time)
if (!times_chron) x <- cols_reclass(x, cols_time, prep_redcap_time)
if (times_chron) {
x <- cols_reclass(x, cols_time, parse_redcap_time)
} else {
x <- cols_reclass(x, cols_time, prep_redcap_time)
}

# repeat instrument column to character
cols_instrument <- ifelse(header_labs, "Repeat Instrument", "redcap_repeat_instrument")
Expand Down

0 comments on commit 7e66d01

Please sign in to comment.