timepoints2 | R Documentation |
timepoints
formatterFormat output from timepoints
into a single matrix
with estimate +/- standard deviation.
timepoints2(
w,
times = NULL,
digits = ifelse(percent, 0L, 3L),
sd = FALSE,
ci = FALSE,
alpha = 0.05,
percent = FALSE,
html = FALSE,
htmlArgs = list(),
...
)
w , times |
arguments passed to |
digits |
number of digits past the decimal point to keep |
sd |
logical; if |
ci , alpha |
logical; calculate a confidence interval using a two-sided
|
percent |
logical; if |
html |
logical; if |
htmlArgs |
for |
... |
ignored |
ci <- cuminc2(Surv(futime, event(censored)) ~ sex, transplant)
timepoints2(ci, sd = TRUE)
timepoints2(ci, html = TRUE)
print(
timepoints2(ci, sd = TRUE, html = TRUE),
rgroup = c('Death', 'Ltx', 'Withdraw'), n.rgroup = c(2, 2, 2),
caption = 'Timepoints<sup>†</sup>',
tfoot = '<sup>†</sup>Estimate ± SD'
)
## example from cmprsk::cuminc
set.seed(2)
ss <- rexp(100)
gg <- factor(sample(1:3, 100, replace = TRUE), 1:3, c('a', 'b', 'c'))
cc <- sample(0:2, 100, replace = TRUE)
strt <- sample(1:2, 100, replace = TRUE)
xx <- cuminc(ss, cc, gg, strt)
timepoints(xx, times = 0:4)
timepoints2(xx, times = 0:4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.