From 33ed328228f1c0586e2ce58127869272060953a8 Mon Sep 17 00:00:00 2001 From: Nan Xiao Date: Fri, 28 Mar 2025 08:56:14 -0400 Subject: [PATCH] Show gt tables on reference pages supported by pkgdown >= 2.1.0 --- R/as_gt.R | 4 ++-- man/as_gt.Rd | 4 ---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/R/as_gt.R b/R/as_gt.R index ad1b4814..30847774 100644 --- a/R/as_gt.R +++ b/R/as_gt.R @@ -32,7 +32,7 @@ as_gt <- function(x, ...) { #' #' @export #' -#' @examplesIf !identical(Sys.getenv("IN_PKGDOWN"), "true") +#' @examples #' # Fixed design examples ---- #' #' library(dplyr) @@ -156,7 +156,7 @@ fd_footnote <- function(x, method) { #' #' @export #' -#' @examplesIf !identical(Sys.getenv("IN_PKGDOWN"), "true") +#' @examples #' \donttest{ #' # Group sequential design examples --- #' diff --git a/man/as_gt.Rd b/man/as_gt.Rd index 502e217a..f9d6e902 100644 --- a/man/as_gt.Rd +++ b/man/as_gt.Rd @@ -59,7 +59,6 @@ A \code{gt_tbl} object. Convert summary table of a fixed or group sequential design object to a gt object } \examples{ -\dontshow{if (!identical(Sys.getenv("IN_PKGDOWN"), "true")) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} # Fixed design examples ---- library(dplyr) @@ -107,8 +106,6 @@ fixed_design_fh( ) \%>\% summary() \%>\% as_gt() -\dontshow{\}) # examplesIf} -\dontshow{if (!identical(Sys.getenv("IN_PKGDOWN"), "true")) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} \donttest{ # Group sequential design examples --- @@ -196,5 +193,4 @@ gs_power_wlr(lpar = list(sf = gsDesign::sfLDOF, total_spend = 0.1)) \%>\% summary() \%>\% as_gt(display_columns = c("Analysis", "Bound", "Nominal p", "Z", "Probability")) } -\dontshow{\}) # examplesIf} }