table_structure: Summarize table

View source: R/summary.R

table_structureR Documentation

Summarize table

Description

Summarize table

Usage

table_structure(x, detail = c("subtable", "row"))

Arguments

x

(VTableTree)
a table object.

detail

(string)
either row or subtable.

Value

No return value. Called for the side-effect of printing a row- or subtable-structure summary of x.

Examples

library(dplyr)

iris2 <- iris %>%
  group_by(Species) %>%
  mutate(group = as.factor(rep_len(c("a", "b"), length.out = n()))) %>%
  ungroup()

lyt <- basic_table() %>%
  split_cols_by("Species") %>%
  split_cols_by("group") %>%
  analyze(c("Sepal.Length", "Petal.Width"),
    afun = list_wrap_x(summary),
    format = "xx.xx"
  )

tbl <- build_table(lyt, iris2)
tbl

row_paths(tbl)

table_structure(tbl)

table_structure(tbl, detail = "row")


Roche/rtables documentation built on April 30, 2024, 11:18 p.m.