date transformation fix for tibbles

This commit is contained in:
dr. M.S. (Matthijs) Berends committed 2018-12-14 09:31:53 +01:00
1 parent 7e5fe75a17
commit e4737d3add
2 files changed
+16 -2

No files matched your search

+2 -2
View File
@@ -172,8 +172,8 @@ first_isolate <- function(tbl,
if (is.null(col_date)) {
stop("`col_date` must be set.", call. = FALSE)
}
# convert to Date
tbl[, col_date] <- as.Date(tbl[, col_date])
# convert to Date (pipes for supporting tibbles too)
tbl[, col_date] <- tbl %>% pull(col_date) %>% as.Date()
# -- patient id
if (is.null(col_patient_id) & any(colnames(tbl) %like% "^(patient|patid)")) {