labelUnits {Publish}R Documentation

labelUnits

Description

Label output tables

Usage

labelUnits(x, ...)

Arguments

x

A matrix obtained with univariateTable.

...

not used

Details

Modify labels and values of variables in summary tables

Value

The re-labeled matrix

Author(s)

Thomas A. Gerds <tag@biostat.ku.dk>

See Also

univariateTable

Examples


data(Diabetes)
tab <- summary(univariateTable(gender~AgeGroups+chol+waist,data=Diabetes))
publish(tab)
ltab <- labelUnits(tab,"chol"="Cholesterol (mg/dL)","<40"="younger than 40")
publish(ltab)

## pass labels immediately to utable
utable(gender~AgeGroups+chol+waist,data=Diabetes,
      "chol"="Cholesterol (mg/dL)","<40"="younger than 40")

## sometimes useful to state explicitly which variables value
## should be re-labelled
utable(gender~AgeGroups+chol+waist,data=Diabetes,
      "chol"="Cholesterol (mg/dL)","AgeGroups.<40"="younger than 40")

[Package Publish version 2023.01.17 Index]