Closed tinalasisi closed 3 years ago
Sorry for the trouble. Unfortunately, this breakage is unavoidable, and something I did not think about when I wrote this NEWS
item, so thanks for pointing it out to me! I will update the NEWS
item to highlight this possibility.
There only two ways to save this from failing:
patchwork
conventionsI switched from cowplot
to patchwork
to reduce the clutter in API
(read no. of arguments) and so I am hesitant to add more arguments (like labels
) only to save past code from breaking. 😢
I just updated a R and Rstudio so I had to reinstall a lot of libraries and when I reinstalled ggstatsplot, I found that I had some issues with previously functioning plots.
Long story short, after fishing around, I found out that certain arguments I was passing that worked before the update don't anymore because they exist only in cowplot::plot_grid but not in patchwork.
For example, if I run:
I get this error:
But if I change the plotgrid.args to a syntax that's compatible with the patchwork update:
Basically replacing
plotgrid.args = list(ncol = 3, labels = "auto")
withplotgrid.args = list(ncol = 3, tag_level = "keep"), annotation.args = list(tag_levels = "a")
Then everything is just fine.
If there's any way to fix this bug by writing in something that automatically fixes old syntax, that would be really handy for people (i assume I might not be the only one who dealt with this bug).
Maybe throwing a more detailed error if someone adds the
labels =
input?Hope this helps - happy plotting!