A helper function to identify which files failed to process. The heuristic is that files that are in the previous metadata but not in the current metadata are likely to be the files that have issues.

find_problem_files(
  outputdir,
  previous = c("basic", "ms2.out", "ms3.out", "ms4.out", "ms5.out")
)

Arguments

outputdir

The folder that contains the output of GGIR (one level up from the 'meta' folder).

previous

The last fully completed stage of processing that was completed. This is the name of the folder (e.g., 'ms2.out', not the GGIR part number).

Value

Invisibly returns a list of files that were missing in the current metadata.

Details

If this list is long, don't remove all of the files. Instead, use a binary search (or similar) to find which file or files are the problem.

See also

Other helper functions: build_meta(), collate_outputs(), translate_filepath()

Examples

if (FALSE) {
outputdir <- "C:\\Documents\\My Study\\Output\\output_mystudy"
find_problem_files(outputdir, "ms2.out")
}