as_gt | R Documentation |
Convert a summary table object created with as_table
to a gt_tbl
object; currently only implemented for
gsBinomialExact
.
as_gt(x, ...)
## S3 method for class 'gsBinomialExactTable'
as_gt(
x,
...,
title = "Operating Characteristics for the Truncated SPRT Design",
subtitle = "Assumes trial evaluated sequentially after each response",
theta_label = html("Underlying<br>response rate"),
bound_label = c("Futility bound", "Efficacy bound"),
prob_decimals = 2,
en_decimals = 1,
rr_decimals = 0
)
x |
Object to be converted. |
... |
Other parameters that may be specific to 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. |
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.
A gt_tbl
object that may be extended by overloaded versions of
as_gt
.
vignette("binomialSPRTExample")
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("Underlying<br>AE rate"),
prob_decimals = 3,
bound_label = c("low rate", "high rate")
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.