daniel1noble / orchaRd

Extending the Orchard Plot for Meta-analysis
https://daniel1noble.github.io/orchaRd/
11 stars 6 forks source link

Fixed for missing data #25

Closed daniel1noble closed 1 year ago

daniel1noble commented 1 year ago

Fixes a bug when models are fit with missing data. Creates a disconnect between number of rows in the model and the data from model, which results in error of functions. New tests are added to catch this issue

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 92.30% and project coverage change: +0.27 :tada:

Comparison is base (952b29c) 62.71% compared to head (22c2a99) 62.99%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #25 +/- ## ========================================== + Coverage 62.71% 62.99% +0.27% ========================================== Files 8 8 Lines 574 581 +7 ========================================== + Hits 360 366 +6 - Misses 214 215 +1 ``` | [Impacted Files](https://app.codecov.io/gh/daniel1noble/orchaRd/pull/25?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniel+Noble) | Coverage Δ | | |---|---|---| | [R/mod\_results.R](https://app.codecov.io/gh/daniel1noble/orchaRd/pull/25?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniel+Noble#diff-Ui9tb2RfcmVzdWx0cy5S) | `86.23% <92.30%> (-0.03%)` | :arrow_down: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

itchyshin commented 1 year ago

@daniel1noble - outstanding! - thank you so much @daniel1noble (the final MS version submitted to MEE now).

daniel1noble commented 1 year ago

No worries @itchyshin! I was working on another project and was surprised to see that dropping the data argument didn't already fix this. But, turns out that Wolfgang has a new slot "not.na" which can be used to drop rows with missing data. It 'should' hopefully fix this problem. I also added two new tests with different situations to try and catch it if it happens again