atyre2 / NRES803

Other
0 stars 8 forks source link

check_assumptions() acting strange #13

Closed diatomdaniel closed 3 years ago

diatomdaniel commented 3 years ago

I've noticed a strange issue with the check_assumptions() function. Check_assumptions() should return one (!) ggplot-object with four panels. During recent use however two ggplot-objects are returned with two panels each. This happens for lms, gams, etc.

I'm not sure why this is happening as the code seems fine. I assume it is an issue with how we add the individual plot objects together. Both ggpubr::ggarrange(rr0, rr1, rr2, rr3, nrow=2) and ggpubr::ggarrange(plotlist = list(rr0, rr1, rr2, rr3), nrow=2) have the same issue.

I have also found a workaround: instead of ggpubr::ggarrange(rr0, rr1, rr2, rr3, nrow=2) use ggpubr::ggarrange(rr0, rr1, rr2, rr3, nrow=2, ncol = 2).

I'll commit the changes to the code later but still this is strange behaviour as nrow = 2 should do the trick...

diatomdaniel commented 3 years ago

Fixed issue, still need to commit though.