DescTools (version 0.99.15)

TOne: Create Table One Describing Baseline Characteristics

Description

Create a table summarizing continuous, categorical and dichotomous variables, optionally stratifyied by one or more variables, while performing adequate statistical tests.

Usage

TOne(x, grp = NA)

Arguments

x
a data.frame containing all the variables to be included in the table.
grp
the grouping variable.

Value

  • a character matrix

Details

There are three types of variables currently implemented: numeric, factor and variables with only two levels.

See Also

WrdTable

Examples

Run this code
opt <- options()

options(fmt.num=structure(list(digits=1, big.mark="'"), class="fmt"))
options(fmt.per=structure(list(digits=1, fmt="%"), class="fmt"))
options(fmt.abs=structure(list(digits=0, big.mark="'"), class="fmt"))

TOne(x = d.pizza[, c("temperature","delivery_min","driver","wine_ordered")],
     grp=d.pizza$quality)

options(opt)

wrd <- GetNewWrd()
WrdTable(TOne(x = d.pizza[, c("temperature","delivery_min","driver","wine_ordered")],
              grp=d.pizza$quality))

Run the code above in your browser using DataCamp Workspace