as_gt.gs_design | R Documentation |
This is the function to format the bounds summary table into gt style.
## S3 method for class 'gs_design' as_gt( x, title = NULL, subtitle = NULL, colname_spanner = "Cumulative boundary crossing probability", colname_spannersub = c("Alternate hypothesis", "Null hypothesis"), footnote = NULL, display_bound = c("Efficacy", "Futility"), display_columns = NULL, display_inf_bound = TRUE, ... )
x |
an object returned by |
title |
a string to specify the title of the gt table |
subtitle |
a string to specify the subtitle of the gt table |
colname_spanner |
a string to specify the spanner of the gt table |
colname_spannersub |
a vector of strings to specify the spanner details of the gt table |
footnote |
a list containing |
display_bound |
a vector of strings specifying the label of the bounds. The default is |
display_columns |
a vector of strings specifying the variables to be displayed in the summary table |
display_inf_bound |
a logic value (TRUE or FALSE) whether to display the +-inf bound |
... |
additional arguments |
a gt table summarizing the bounds table in group sequential designs
# the default output library(dplyr) gs_design_ahr() %>% summary() %>% as_gt() gs_power_ahr() %>% summary() %>% as_gt() gs_design_wlr() %>% summary() %>% as_gt() gs_power_wlr() %>% summary() %>% as_gt() ## Not run: gs_design_combo() %>% summary() %>% as_gt() gs_power_combo() %>% summary() %>% as_gt() gs_design_rd() %>% summary() %>% as_gt() gs_power_rd() %>% summary() %>% as_gt() ## End(Not run) # usage of title = ..., subtitle = ... # to edit the title/subtitle gs_power_wlr() %>% summary() %>% as_gt( title = "Bound Summary", subtitle = "from gs_power_wlr") # usage of colname_spanner = ..., colname_spannersub = ... # to edit the spanner and its sub-spanner gs_power_wlr() %>% summary() %>% as_gt( colname_spanner = "Cumulative probability to cross boundaries", colname_spannersub = c("under H1", "under H0")) # usage of footnote = ... # to edit the footnote gs_power_wlr() %>% summary() %>% as_gt( footnote = list(content = c("approximate weighted hazard ratio to cross bound.", "wAHR is the weighted AHR.", "the crossing probability.", "this table is generated by gs_power_wlr."), location = c("~wHR at bound", NA, NA, NA), attr = c("colname", "analysis", "spanner", "title"))) # usage of display_bound = ... # to either show efficacy bound or futility bound, or both(default) gs_power_wlr() %>% summary() %>% as_gt(display_bound = "Efficacy") # usage of display_columns = ... # to select the columns to display in the summary table gs_power_wlr() %>% summary() %>% as_gt(display_columns = c("Analysis", "Bound", "Nominal p", "Z", "Probability"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.