tib2tab: tib2tab

Description Usage Arguments Examples

View source: R/tib2tab.R

Description

This function accepts a master tibble made in dat2tib and creates a summary table with one row per outcome variable and summary statistics by treatment arms.

Usage

1
tib2tab(mtib, stat_fmt, comp_fmt, adjust = F)

Arguments

mtib

A master tibble

stat_fmt

Format for summary statistics by arm in glue syntax

comp_fmt

Format for pairwise comparison statistics in glue syntax

adjust

a logical value indicating whether summary statistics should be adjusted or unadjusted by model covariates

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
tib <- dat2tib(data = cdisc_data, 
               model = lm(aval ~ arm + age + sex), 
               outcome = aval, 
               trt = arm, 
               nest = param, 
               tran='none')
               
tib2tab(mtib = tib, 
        stat_fmt = "{mean} ({sd})", 
        comp_fmt = "{estimate} ({lower_CL}, {upper_CL})")

## End(Not run)

RhoInc/dat2stat documentation built on Nov. 15, 2019, 10:06 a.m.