Learn R Programming

rtables (version 0.4.0)

manual_cols: Manual column declaration

Description

Manual column declaration

Usage

manual_cols(..., .lst = list(...))

Arguments

One or more vectors of levels to appear in the column splace. If more than one set of levels is given, the values of the second are nested within each value of the first, and so on.

.lst

A list of sets of levels, by default populated via list(...).

Value

An InstantiatedColumnInfo object, suitable for use declaring the column structure for a manually constructed table.

Examples

Run this code
# NOT RUN {
# simple one level column space
rows = lapply(1:5, function(i) {
   DataRow(rep(i, times  = 3))})
tab = TableTree(kids = rows, cinfo = manual_cols(split = c("a", "b", "c")))
tab

# manually declared nesting
tab2 = TableTree(kids = list(DataRow(as.list(1:4))),
                 cinfo = manual_cols(Arm = c("Arm A", "Arm B"),
                                     Gender = c("M", "F")))

tab2

# }

Run the code above in your browser using DataLab