Learn R Programming

rtables (version 0.5.1)

basic_table: Layout with 1 column and zero rows

Description

Every layout must start with a basic table.

Usage

basic_table(
  title = "",
  subtitles = character(),
  main_footer = character(),
  prov_footer = character(),
  show_colcounts = FALSE
)

Value

A PreDataTableLayouts object suitable for passing to further layouting functions, and to build_table.

Arguments

title

character(1). Main title. Ignored for subtables.

subtitles

character. Subtitles. Ignored for subtables.

main_footer

character. Main global (non-referential) footer materials.

prov_footer

character. Provenance-related global footer materials. Generally should not be modified by hand.

show_colcounts

logical(1). Should column counts be displayed in the resulting table when this layout is applied to data

Examples

Run this code

lyt <- basic_table() %>%
  analyze("AGE", afun = mean)

build_table(lyt, DM)


lyt <- basic_table(title = "Title of table", subtitles = c("a number", "of subtitles"),
                   main_footer = "test footer",
                   prov_footer = paste("test.R program, executed at", Sys.time())) %>%
  split_cols_by("ARM") %>%
  analyze("AGE", mean)

build_table(lyt, DM)

Run the code above in your browser using DataLab