An RKWard plugin for creating beautiful, publication-ready summary
tables using the powerful {gtsummary}
package.
This plugin provides a user-friendly graphical interface for the
tbl_summary
and tbl_svysummary
functions,
allowing for easy generation of descriptive statistics tables for both
standard data frames and complex survey designs.
tbl_summary
) from any data.frame
.tbl_svysummary
, correctly handling
survey.design
objects from the {survey}
package.by=
).strata=
).rk.get.label()
) for clear, descriptive
tables, or provide your own custom label formulas.gt
,
kable
, etc.).tbl_summary
)The dialog provides four clear tabs for specifying your data, statistics, labels, and themes.
(Image: Screenshot of the main dialog showing the four tabs: Data, Statistics, Labels & Missing, Themes & Formatting)
The plugin generates rich HTML tables that are displayed in RKWard’s output viewer or an external browser.
(Image: Screenshot of a finished gtsummary table, stratified, showing clear labels and statistics)
This plugin is not yet on CRAN. To install it, you need the
{devtools}
package and can install directly from its future
GitHub repository.
Install {devtools}
: If you don’t
have it, open the R console in RKWard and run:
install.packages("devtools")
Install the Plugin: Run the following command in the R console:
local({
## Preparar
require(devtools)
## Computar
install_github(
repo="AlfCano/rk.gtsummary"
)## Imprimir el resultado
rk.header ("Resultados de Instalar desde git")
})
Settings -> R Packages -> Select loaded packages
and
ensure that rk.gtsummary
is checked.Once installed, the plugin will be available in the RKWard menu under:
analysis
->
gt Summaries
You will see two options:
data.frame
objects.survey.design
objects.Select the appropriate option, choose your data and variables in the dialog, customize the options in the tabs, and click “Submit” to generate the table.
This plugin requires the following R packages to be installed: -
{gtsummary}
- {survey}
Alfonso Cano alfonso.cano@correo.buap.mx
Code generation and iterative debugging assisted by Gemini, a large language model from Google.
GPL (>= 3)
gtsummary
package produces rich HTML output. This
output is not compatible with RKWard’s standard code preview pane.
Please use the “Submit” button to generate the final table, which will
open in the appropriate viewer.