Called from table1 to render the strata labels for display in the table. This is the default function, but it can be overriden by a user-supplied function.

render.strat(strata, ..., transpose = F)

Arguments

strata

A named list of data.frames.

...

Additional arguments.

transpose

Logical indicating whether on not the table is transposed.

Value

A character, which may contain HTML markup.

Examples

dat <- expand.grid(id=1:10, sex=c("Male", "Female"), treat=c("Treated", "Placebo"))
strata <- split(dat, dat$treat)
render.strat(strata)
#>                                  Treated\n(N=20) 
#> "Treated<br/><span class='stratn'>(N=20)</span>" 
#>                                  Placebo\n(N=20) 
#> "Placebo<br/><span class='stratn'>(N=20)</span>"