footnote.decorated: Footnote Decorated

View source: R/xtable.R

footnote.decoratedR Documentation

Footnote Decorated

Description

Footnotes a decorated data.frame. Generates a text string that defines column names using label and unit attributes.

Usage

## S3 method for class 'decorated'
footnote(x, ..., equal = ":", collapse = "; ")

Arguments

x

decorated

...

passed to append_units

equal

character: a symbol suggesting equality between a name and its note

collapse

used to paste column-wise footnotes

Value

character

See Also

Other footnote: footnote()

Examples

library(magrittr)
set.seed(0)
x <- data.frame(
 auc = rnorm(100, mean = 2400, sd = 200),
 bmi = rnorm(100, mean = 20, sd = 5),
 gen = 0:1
)
x %<>% decorate('auc: [AUC_0-24, ng*h/mL]')
x %<>% decorate('bmi: [Body Mass Index, kg/m^2]')
x %<>% decorate('gen: [Gender, [Male: 1, Female: 0]]')
x %<>% resolve
footnote(x)
footnote(x, auc)

yamlet documentation built on Oct. 6, 2023, 9:07 a.m.