xtable {survMisc} | R Documentation |
xtable
methods
Description
xtable
methods
Usage
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 |
... |
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
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))
[Package survMisc version 0.5.6 Index]