diff --git a/NAMESPACE b/NAMESPACE index 68a136ba..3c3fb388 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,5 +1,7 @@ # Generated by roxygen2: do not edit by hand +S3method(as_gt,fixed_design) +S3method(as_gt,gs_design) S3method(as_gt,simtrial_gs_wlr) S3method(summary,simtrial_gs_wlr) S3method(wlr,counting_process) diff --git a/R/as_gt.R b/R/as_gt.R index 0f9111d5..f43e857c 100644 --- a/R/as_gt.R +++ b/R/as_gt.R @@ -142,3 +142,16 @@ as_gt.simtrial_gs_wlr <- function(x, gt::tab_header(title = title, subtitle = subtitle) } } + +# Only purpose of the methods below is to fix S3 redirection when simtrial is +# loaded after gsDesign2, which masks the as_gt() generic from gsDesign2 + +#' @export +as_gt.fixed_design <- function(x, ...) { + gsDesign2:::as_gt.fixed_design(x, ...) +} + +#' @export +as_gt.gs_design <- function(x, ...) { + gsDesign2:::as_gt.gs_design(x, ...) +}