Skip to content

Commit

Permalink
Part 2 report needs to define f1 based on number of files in basic fo…
Browse files Browse the repository at this point in the history
…lder and not ms2.out folder
  • Loading branch information
vincentvanhees committed Jan 15, 2025
1 parent 7d987e3 commit 941c2a0
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions R/GGIR.R
Original file line number Diff line number Diff line change
Expand Up @@ -352,13 +352,11 @@ GGIR = function(mode = 1:5, datadir = c(), outputdir = c(),
# -----
# check a few basic assumptions before continuing
if (length(which(do.report == 2)) > 0) {
N.files.ms2.out = length(dir(paste0(metadatadir, "/meta/ms2.out")))
if (N.files.ms2.out > 0) {
N.files.basic = length(dir(paste0(metadatadir, "/meta/basic")))
if (N.files.basic > 0) {
if (verbose == TRUE) print_console_header("Report part 2")
# if (N.files.ms2.out < f0) f0 = 1
# if (N.files.ms2.out < f1) f1 = N.files.ms2.out
if (length(f0) == 0) f0 = 1
if (f1 == 0) f1 = N.files.ms2.out
if (f1 == 0) f1 = N.files.basic
if (length(params_247[["qwindow"]]) > 2 |
(is.character(params_247[["qwindow"]]) && length(grep(pattern = "onlyfilter|filteronly", x = params_247[["qwindow"]])) == 0) |
(length(params_247[["qwindow"]]) == 2 & !all(c(0, 24) %in% params_247[["qwindow"]]))) {
Expand Down

0 comments on commit 941c2a0

Please sign in to comment.