Closed kevinsorochan closed 11 months ago
This issue has come up before (Issue #21 ). For some background info please read the discussion there.
Can you include the modifications made to vpr_autoid_read()
? Or the branch they have been pushed to on GitHub?
We can definitely make a catch for empty files, if the goal is to just not throw an error, I would write something like if(length(lines(emptyaidfilename) == 0)){ skip = TRUE }else{ skip = FALSE }
And then check the skip
argument before opening a file
I think there are many reasons to not delete the empty files. It does not seem like a completely necessary step and adds problems in debugging as mentioned in Issue #21. Using skip seems like the best option.
Is your feature request related to a problem? Please describe.
Generally, I think deleting the empty aid files is not the best solution because I think it is an unnecessary step. I've come up with an alternative by modifying vpr_autoid_read() slightly
Describe the solution you'd like
In vpr_autoid_read(), the aid files are read in and an error comes up if the file is empty. I suggest adding an if statement that creates a placeholder roi id (e.g., "no_roi") that is then later removed by filtering dplyr::filter(, !(roi == "no_roi")
Describe alternatives you've considered see above
Additional context none