xtable.decorated: Create Export Table for Decorated

View source: R/xtable.R

xtable.decoratedR Documentation

Create Export Table for Decorated

Description

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

Usage

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

Arguments

x

decorated

...

passed to footnote and (if named) xtable

label

passed to xtable

style

passed to footnote

Value

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

Examples

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')


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