Description Usage Arguments Value Examples
Plot survival curves
1 2 3 4 5 6 7 8 9 10 11 |
object |
|
... |
Arguments passed on to |
fun |
Name of function or function used to transform the survival curve:
|
markTimes |
Label curves marked at each censoring time? |
symbol |
Symbol to use as marker |
markerColor |
Colour of the marker; if |
ranges |
Plot interval ranges? |
rangesOpacity |
Opacity of the interval ranges |
highchart
object to plot survival curves
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # Plot Kaplan-Meier curves
require("survival")
require("highcharter")
leukemia.surv <- survfit(Surv(time, status) ~ x, data = aml)
hchart(leukemia.surv)
# Plot the cumulative hazard function
lsurv2 <- survfit(Surv(time, status) ~ x, aml, type='fleming')
hchart(lsurv2, fun="cumhaz")
# Plot the fit of a Cox proportional hazards regression model
fit <- coxph(Surv(futime, fustat) ~ age, data = ovarian)
ovarian.surv <- survfit(fit, newdata=data.frame(age=60))
hchart(ovarian.surv, ranges = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.