out.plain: Plain Text Output

View source: R/Table1.R

out.plainR Documentation

Plain Text Output

Description

This function outputs the results of calls to make.table, quick.table, cat.var, and cont.var to the console as formatted plain text data frames.

Usage

  out.plain(tab, colnames)

Arguments

tab

A single call to either cat.var or cont.var, or a data frame produced via make.table or quick.table. Required.

colnames

A vector of column names for the table output. Optional.

Details

A call to this function is the default output argument to all package functions that produce summary output.

Value

A plain text data frame of summary statistics outputted to the console.

Author(s)

Erica Wozniak

See Also

Table1 make.table quick.table cat.var cont.var stat.col out.latex out.html

Examples

library(survival)

make.table(dat   = pbc,
    cat.varlist  = c('stage', 'sex'),
    cat.header   = c('Stage', 'Sex'),
    cat.rownames = list(c('I', 'II', 'III', 'IV'), c('Male', 'Female')),
    cat.ptype    = c('fisher', 'fisher'),   
    cont.varlist = c('bili', 'copper'),
    cont.header  = c('Bilirubin', 'Urine copper'),
    cont.ptype   = c('wilcox', 'wilcox'), 
    strat        = c('trt'),
    # Remove row percents from all categorical variables (list is recycled)
    cat.rmstat   = list('row'),
    # Remove missing, min/max from bili and no summary stats from copper
    cont.rmstat  = list(c('miss', 'minmax'), 'None'),
    colnames     = c('', 'D-penicillamine', 'Placebo', 'Overall', 'p-value')
    )

emwozniak/Table1 documentation built on Oct. 5, 2022, 12:20 a.m.