render.varlabel: Render variable labels for table output.

Description Usage Arguments Value Examples

View source: R/tab1.R

Description

Called from tab1 by default to render variable labels for displaying in the table.

Usage

1
render.varlabel(x, transpose = F)

Arguments

x

A vector, usually with the var_lab and (if appropriate) unit attributes.

transpose

Logical indicating whether on not the table is transposed.

Value

A character, which may contain HTML markup.

Examples

1
2
3
4
5
6
7
8
x <- exp(rnorm(100, 1, 1))
var_lab(x) <- "Weight"
render.varlabel(x)

y <- factor(sample(0:1, 99, replace=TRUE), labels=c("Female", "Male"))
y[1:10] <- NA
var_lab(y) <- "Sex"
render.varlabel(y)

adayim/cttab documentation built on Dec. 18, 2021, 10:27 p.m.