Learn R Programming

yamlet (version 1.2.1)

xtable.decorated: Create Export Table for Decorated

Description

Creates an export table for decorated data.frame by adding a footnote attribute.

Usage

# S3 method for decorated
xtable(x, ..., label = NULL, style = "latex")

Value

class 'decorated_xtable','xtable', 'data.frame'

Arguments

x

decorated

...

passed to footnote and (if named) xtable

label

passed to xtable

style

passed to footnote

Examples

Run this code
library(magrittr)
library(xtable)
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]]')
y <- xtable(x)
attr(y, 'footnote')
y <- xtable(x, auc:bmi)
attr(y, 'footnote')

Run the code above in your browser using DataLab