as_xtable.tablet: Coerce Tablet to Xtable

View source: R/xtable.R

as_xtable.tabletR Documentation

Coerce Tablet to Xtable

Description

Renders a tablet as xtable. Calls xtable and implements default aesthetics.

Usage

## S3 method for class 'tablet'
as_xtable(
  x,
  caption = NULL,
  label = NULL,
  align = NULL,
  digits = NULL,
  display = NULL,
  auto = FALSE,
  variable = " ",
  format_name = function(x, ...) paste0("\\!\\!\\textbf{", x, "}"),
  format_stat = function(x, ...) x,
  format_value = function(x, ...) x,
  ...
)

Arguments

x

tablet

caption

passed to xtableList

label

passed to xtableList

align

passed to xtableList

digits

passed to xtableList

display

passed to xtableList

format_name

function to format variable names (accepts at least x and dots)

format_stat

function to format names of statistics and factor levels (accepts at least x and dots)

format_value

function to format cell values (accepts at least x and dots)

...

passed to xtableList

Value

like xtableList

Examples

library(boot)
library(dplyr)
library(magrittr)
library(xtable)
melanoma %>%
  select(-time, -year) %>%
  mutate(sex = factor(sex), ulcer = factor(ulcer)) %>%
  group_by(status) %>%
  tablet %>%
  as_xtable

tablet documentation built on Sept. 16, 2023, 1:08 a.m.