PlotOneSampleAUC: Plot Area Under the Kaplan-Meier Curve.

View source: R/plot_auc.R

PlotOneSampleAUCR Documentation

Plot Area Under the Kaplan-Meier Curve.

Description

Plot Area Under the Kaplan-Meier Curve.

Usage

PlotOneSampleAUC(
  data,
  color = "#0F9D58",
  label = "Ctrl",
  legend_pos = "top",
  return_surv = TRUE,
  status_name = "status",
  tau = NULL,
  time_name = "time",
  title = NULL,
  which_arm = 0,
  x_breaks = NULL,
  x_labs = NULL,
  x_name = "Time",
  x_max = NULL,
  y_name = "Survival",
  y_lim = c(0, 1)
)

Arguments

data

Data including time, status, arm.

color

Color.

label

Label for the arm.

legend_pos

Legend position.

return_surv

Logical, TRUE for survival, FALSE for cumulative incidence.

status_name

Name of status column.

tau

Truncation time for shading.

time_name

Name of time column.

title

Plot title.

which_arm

0 for control, 1 for treatment.

x_breaks

X-axis breaks.

x_labs

X-axis labels.

x_name

X-axis name.

x_max

X-axis upper limit; may differ from tau.

y_name

Y-axis name.

y_lim

Y-axis limits.

Value

ggplot.


zrmacc/SurvUtils documentation built on Sept. 28, 2024, 8:43 a.m.