Learn R Programming

yamlet (version 0.4.8)

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, style = "latex", ...)

Arguments

x

decorated

style

passed to footnote

...

passed to footnote and xtable

Value

class 'decorated', 'xtable','data.frame'

Examples

Run this code
# NOT RUN {
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')

# }

Run the code above in your browser using DataLab