Learn R Programming

gsDesign (version 3.5.0)

as_gt: Print a summary table using gt

Description

Create print a table created with as_table to summarize an object and print it using gt; currently only implemented for gsBinomialExact.

Usage

as_gt(x, ...)

# S3 method for gsBinomialExactTable as_gt( x, title = "Operating Characteristics for the Truncated SPRT Design", subtitle = "Assumes trial evaluated sequentially after each response", theta_label = html("Underlying
response rate"), bound_label = c("Futility bound", "Efficacy bound"), prob_decimals = 2, en_decimals = 1, rr_decimals = 0, ... )

Value

A `gt` object that may be extended by overloaded versions of

as_gt.

Arguments

x

Object to be printed using gt.

...

Other parameters that may be specific the object.

title

Table title.

subtitle

Table subtitle.

theta_label

Label for theta.

bound_label

Label for bounds.

prob_decimals

Number of decimal places for probability of crossing.

en_decimals

Number of decimal places for expected number of observations when bound is crossed or when trial ends without crossing.

rr_decimals

Number of decimal places for response rates.

Details

Currently only implemented for gsBinomialExact objects. Creates a table to summarize an object. For gsBinomialExact, this summarized operating characteristics across a range of effect sizes.

See Also

vignette("binomialSPRTExample")

Examples

Run this code
safety_design <- binomialSPRT(p0 = .04, p1 = .1, alpha = .04, beta = .2, minn = 4, maxn = 75)
safety_power <- gsBinomialExact(
  k = length(safety_design$n.I),
  theta = seq(.02, .16, .02),
  n.I = safety_design$n.I,
  a = safety_design$lower$bound,
  b = safety_design$upper$bound
)
safety_power %>%
  as_table() %>%
  as_gt(
    theta_label = gt::html("UnderlyingAE rate"),
    prob_decimals = 3,
    bound_label = c("low rate", "high rate")
  )

Run the code above in your browser using DataLab