Learn R Programming

yamlet (version 1.2.1)

footnote.decorated: 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 decorated
footnote(x, ..., equal = ":", collapse = "; ")

Value

character

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

See Also

Other footnote: footnote()

Examples

Run this code
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)

Run the code above in your browser using DataLab