| Title: | Interactive Table of Descriptive Statistics in HTML |
|---|---|
| Description: | Create an interactive table of descriptive statistics in HTML. This table is typically used for exploratory analysis in a clinical study (referred to as 'Table 1'). |
| Authors: | Yilong Zhang [aut, cre] |
| Maintainer: | Yilong Zhang <[email protected]> |
| License: | GPL (>= 3) |
| Version: | 0.4.0 |
| Built: | 2026-06-01 08:56:45 UTC |
| Source: | https://github.com/elong0527/metalite.table1 |
Interactive Table of Descriptive Statistics in HTML
metalite_table1( formula, data, id = NULL, var_listing = NULL, total = TRUE, header = NULL, download = "none", record_name = NULL, ... )metalite_table1( formula, data, id = NULL, var_listing = NULL, total = TRUE, header = NULL, download = "none", record_name = NULL, ... )
formula |
an object of class "formula". |
data |
a data frame that contain variables described in the |
id |
a character value to indicate subject/record id variable name in |
var_listing |
a character vector of additional variables included in the drill down listing. |
total |
a logical value to display or hide "Total" column. |
header |
a logical vector with length 1 or same length of the variables in |
download |
a character value to enable download button. Allowed values include "none", "listing", "table", and 'all'. |
record_name |
a character value to control section title (e.g. "Subjects", "Records"). |
... |
additional arguments passed to |
a shiny.tag.list object that contain a reactable HTML widget for
interactive table of describptive statistics.
if (interactive()) { metalite_table1(~ AGE + SEX | TRT01A, data = r2rtf::r2rtf_adsl, id = "SUBJID") }if (interactive()) { metalite_table1(~ AGE + SEX | TRT01A, data = r2rtf::r2rtf_adsl, id = "SUBJID") }
Convert to data frame
metalite_table1_to_df(x)metalite_table1_to_df(x)
x |
an output from |
a data frame that contain the table from the html output and
a .id variable for variables.
Convert to html
metalite_table1_to_html(x)metalite_table1_to_html(x)
x |
an output from |
HTML string of reactable HTML widget for
interactive table of describptive statistics.
metalite_table1 to an RTF fileConvert metalite_table1 to an RTF file
metalite_table1_to_rtf( x, file, title = "Baseline Characteristics", col_rel_width = NULL )metalite_table1_to_rtf( x, file, title = "Baseline Characteristics", col_rel_width = NULL )
x |
Output of |
file |
A character string naming a file to save rtf file. |
title |
Title in a character string. |
col_rel_width |
Column relative width in a vector e.g. c(2,1,1) refers to 2:1:1. Default is NULL for equal column width. |
a string of the RTF file path
Convert reactable to a data frame
reactable_to_df(x)reactable_to_df(x)
x |
A |
A data frame