Learn R Programming

rtables (version 0.4.0)

row_paths_summary: Print Row/Col Paths Summary

Description

Print Row/Col Paths Summary

Usage

row_paths_summary(x)

col_paths_summary(x)

Arguments

x

an rtable object

Value

A data.frame summarizing the row- or column-structure of x.

Examples

Run this code
# NOT RUN {
library(dplyr)

ex_adsl_MF <- ex_adsl %>% filter(SEX %in% c("M", "F"))

tbl <- basic_table() %>%
  split_cols_by("ARM") %>%
  split_cols_by("SEX", split_fun = drop_split_levels) %>%
  analyze(c("AGE", "BMRKR2")) %>%
  build_table(ex_adsl_MF)

tbl

df <- row_paths_summary(tbl)

df

col_paths_summary(tbl)

# manually constructed table
tbl3 <- rtable(
   rheader(
     rrow("row 1", rcell("a", colspan = 2),
     rcell("b", colspan = 2)
   ),
   rrow("h2", "a", "b", "c", "d")),
   rrow("r1", 1, 2, 1, 2), rrow("r2", 3, 4, 2,1)
)
col_paths_summary(tbl3)
# }

Run the code above in your browser using DataLab