Learn R Programming

survMisc (version 0.5.3)

xtable: xtable methods

Description

xtable methods

Usage

xtable(x, caption = NULL, label = NULL, align = NULL, digits = NULL, display = NULL, ...)
"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, ...)
"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.

See Also

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

Examples

Run this code
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))

Run the code above in your browser using DataLab