Last chance! 50% off unlimited learning
Sale ends in
survival::survfit
Autoplot survival::survfit
# S3 method for survfit
autoplot(
object,
fun = NULL,
surv.geom = "step",
surv.colour = NULL,
surv.size = NULL,
surv.linetype = NULL,
surv.alpha = NULL,
surv.fill = NULL,
surv.shape = NULL,
surv.connect = TRUE,
conf.int = TRUE,
conf.int.colour = "#0000FF",
conf.int.linetype = "none",
conf.int.fill = "#000000",
conf.int.alpha = 0.3,
censor = TRUE,
censor.colour = NULL,
censor.size = 3,
censor.alpha = NULL,
censor.shape = "+",
facets = FALSE,
nrow = NULL,
ncol = 1,
grid = FALSE,
strip_swap = FALSE,
scales = "free_y",
xlim = c(NA, NA),
ylim = c(NA, NA),
log = "",
main = NULL,
xlab = NULL,
ylab = NULL,
asp = NULL,
...
)
ggplot
survival::survfit
instance
an arbitrary function defining a transformation of the survival curve
geometric string for survival curve. 'step', 'line' or 'point'
line colour for survival curve
point size for survival curve
line type for survival curve
alpha for survival curve
fill colour survival curve
point shape survival curve
logical frag indicates whether connects survival curve to the origin
Logical flag indicating whether to plot confidence intervals
line colour for confidence intervals
line type for confidence intervals
fill colour for confidence intervals
alpha for confidence intervals
Logical flag indicating whether to plot censors
colour for censors
size for censors
alpha for censors
shape for censors
Logical value to specify use facets
Number of facet/subplot rows
Number of facet/subplot columns
Logical flag indicating whether to draw grid
swap facet or grid strips
Scale value passed to ggplot2
limits for x axis
limits for y axis
which variables to log transform ("x", "y", or "xy")
character vector or expression for plot title
character vector or expression for x axis label
character vector or expression for y axis label
the y/x aspect ratio
other arguments passed to methods
if (FALSE) {
if (requireNamespace("survival", quietly = TRUE)) {
autoplot(survfit(Surv(time, status) ~ sex, data = lung))
autoplot(survfit(Surv(time, status) ~ sex, data = lung), facets = TRUE)
autoplot(survfit(Surv(time, status) ~ 1, data = lung))
autoplot(survfit(Surv(time, status) ~ sex, data=lung), conf.int = FALSE, censor = FALSE)
autoplot(survfit(coxph(Surv(time, status) ~ sex, data = lung)))
}
}
Run the code above in your browser using DataLab