You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for the wonderful pkg. I use it often and it's super helpful 🥇
The first line of code in the arithmetic operator functions is if (should_autowrap(e2)) e2 <- wrap_elements(full = e2). The should_autowrap() function is simple, and makes it possible to apply the wrap_elements() function to gobs that require it.
I maintain a ggplot-based package for creating survival curves (https://github.com/ddsjoberg/ggsurvfit), and I would love to be able to utilize the patchwork arithmetic operators. To make this work, I would need to perform some pre-processing for my class of plot. To make the patchwork arithmetic operators extendable, we could update this line if (should_autowrap(e2)) e2 <- wrap_elements(full = e2) to be a generic instead.
By making this a generic function, other package authors could write their own methods to properly handle plots of other classes. If you're amenable to this, I can prepare a pull request. Thanks! 🐟
The text was updated successfully, but these errors were encountered:
Hej hej @thomasp85 !
Thank you for the wonderful pkg. I use it often and it's super helpful 🥇
The first line of code in the arithmetic operator functions is
if (should_autowrap(e2)) e2 <- wrap_elements(full = e2)
. Theshould_autowrap()
function is simple, and makes it possible to apply thewrap_elements()
function to gobs that require it.I maintain a ggplot-based package for creating survival curves (https://github.com/ddsjoberg/ggsurvfit), and I would love to be able to utilize the patchwork arithmetic operators. To make this work, I would need to perform some pre-processing for my class of plot. To make the patchwork arithmetic operators extendable, we could update this line
if (should_autowrap(e2)) e2 <- wrap_elements(full = e2)
to be a generic instead.Here's what I had in mind:
By making this a generic function, other package authors could write their own methods to properly handle plots of other classes. If you're amenable to this, I can prepare a pull request. Thanks! 🐟
The text was updated successfully, but these errors were encountered: