gtsummary live demo — edit and run in your browser

Run gtsummary on a real clinical trial dataset directly in your browser. Edit the R code, press Run, and see a publication-ready summary table rebuild — no install required.

This page runs real R in your browser via WebAssembly — no install, nothing uploaded. Edit the gtsummary code below and press Run Code to rebuild the table on the built-in trial clinical-trial dataset (200 patients).

Note

The first run downloads R plus gtsummary and its dependencies into your browser, so give it 10–30 seconds. After that it’s instant. New to gtsummary? Follow the step-by-step tutorial first, or try the no-code Table 1 explorer.

A grouped Table 1 with a p-value

This is the classic baseline-characteristics table: summarised by treatment, with an automatically chosen test per row. Run it, then try the experiments below.

TipThings to try
  • Change by = trt to by = grade to group by tumour grade instead.
  • Add |> add_overall() after add_p() for a whole-sample column.
  • Add |> bold_labels() to bold the row labels.
  • Swap add_p() for nothing to see the plain summary.

Customise the statistics

A second, richer example — relabelled variables, mean (SD) for continuous columns, and a caption. Edit any argument and re-run:

Note the |> as_gt() at the end of each block: it converts the gtsummary table to a gt object, which is what renders as a formatted HTML table in the browser.


This is the same gtsummary we use to produce publication-ready tables on client data. See how we work, or read the step-by-step tutorial.