pharmaverse/metatools

Zero-row `supp` data for `combine_supp()` gives unclear error

Closed this issue · 0 comments

I just received an SDTM dataset where the supplemental data exists but has zero rows. I think (but I'm not sure) that it's valid SDTM to have an empty file like that.

If it's valid SDTM, then I think that the user should see a warning saying something like "Zero rows in supp data, returning original data unchanged".

If it's not valid SDTM, then perhaps we allow it and do the suggestion above. Or, we could make it an error to send in an empty supp dataset.

If one of the above sounds like a good suggestion, then I'm happy to make a PR.

What I saw when I sent in the empty supp was:

Error in `reduce()`:
! Must supply `.init` when `.x` is empty.
Run `rlang::last_error()` to see where the error occurred.