Is it feasible to export methods for +.ggsurvfit, -.ggsurvfit, /.ggsurvfit, etc. They would work just like the patchwork versions, but would call ggsurvfit_build() to first construct the risktable, then pass the objects on to the ggplot2 methods.
https://patchwork.data-imaginist.com/reference/plot_arithmetic.html
I did some preliminary testing with a built ggsurvfit figure, and it did not seem to be as straight-forward as I was hoping.
This help file on generics for operators is helpful. The class of both sides of the operator are considered before it's dispatched to a method.
https://stat.ethz.ch/R-manual/R-devel/library/base/html/groupGeneric.html
Is it feasible to export methods for
+.ggsurvfit,-.ggsurvfit,/.ggsurvfit, etc. They would work just like the patchwork versions, but would callggsurvfit_build()to first construct the risktable, then pass the objects on to the ggplot2 methods.https://patchwork.data-imaginist.com/reference/plot_arithmetic.html
I did some preliminary testing with a built ggsurvfit figure, and it did not seem to be as straight-forward as I was hoping.
This help file on generics for operators is helpful. The class of both sides of the operator are considered before it's dispatched to a method.
https://stat.ethz.ch/R-manual/R-devel/library/base/html/groupGeneric.html