From dd7e81964464aca5773e0f457df6306e545370fd Mon Sep 17 00:00:00 2001 From: Vincent van Hees Date: Fri, 17 Jan 2025 14:25:48 +0100 Subject: [PATCH] correct previous commit where check on activityDiary existence was introduce --- R/g.part2.R | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/R/g.part2.R b/R/g.part2.R index 3acff76b8..17a67db01 100644 --- a/R/g.part2.R +++ b/R/g.part2.R @@ -29,8 +29,9 @@ g.part2 = function(datadir = c(), metadatadir = c(), f0 = c(), f1 = c(), use_qwindow_as_diary = FALSE } tmp_activityDiary_file = paste0(metadatadir, "/activityDiary.RData") - if (file.exists(tmp_activityDiary_file) || - file.info(params_247[["qwindow"]])$ctime >= file.info(tmp_activityDiary_file)$ctime) { + + if (!file.exists(tmp_activityDiary_file) || (file.exists(tmp_activityDiary_file) && + file.info(params_247[["qwindow"]])$ctime >= file.info(tmp_activityDiary_file)$ctime)) { if (verbose == TRUE) cat("\nConverting activity diary...") # This will be an object with numeric qwindow values for all individuals and days params_247[["qwindow"]] = g.conv.actlog(params_247[["qwindow"]],