xtable: 'xtable' methods

Description Usage Arguments Value Note See Also Examples

View source: R/xtable.R

Description

xtable methods

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
xtable(x, caption = NULL, label = NULL, align = NULL, digits = NULL,
  display = NULL, ...)

## S3 method for class 'table'
xtable(x, caption = paste0(paste(names(dimnames(x)), collapse
  = " $\\times$ "), "\\\\ chi-sq=",
  signif(suppressWarnings(stats::chisq.test(x)$p.value), digits)),
  label = NULL, align = c("l", rep("c", dim(x)[2])), digits = 2,
  display = NULL, ...)

## S3 method for class 'survfit'
xtable(x, caption = paste0("Survival for ",
  deparse(x$call[[2]])), label = NULL, align = c("l", rep("c", 7)),
  digits = NULL, display = rep("fg", 8), ...)

Arguments

x

An object with an xtable method.

caption

Caption.

label

Label.

align

Alignment of columns.

digits

Number of digits to display.

display

How to display - passed to formatC.

...

Additional arguments (not implemented).

Value

An xtable, suitable for use with/ parsing by LaTeX.

Note

xtable.survfit - this does not show the (restricted) mean survival, only the median with confidence intervals.

See Also

? xtable ? xtable::print.xtable methods("xtable")

Examples

1
2
3
4
5
data("kidney", package="KMsurv")
xtable(with(kidney, table(delta, type)))

## K&M. Example 7.2, pg 210.
xtable(survfit(Surv(time=time, event=delta) ~ type, data=kidney))

survMisc documentation built on July 5, 2018, 9:02 a.m.