plotSurvival: Survival curves

Description Usage Arguments Value See Also Examples

View source: R/plotSurvival.R

Description

Plots survival curves for each risk and group.

Usage

1
2
3
4
plotSurvival(fit, target = NULL, ggtheme = theme_minimal(),
  titleSurv = "Survival curves", xtitle = "Time",
  ytitleSurv = "Probability of survivng up to time t",
  legendtitle = "Group")

Arguments

fit

a result of fitSurvival function.

target

point in time, in which the confidence bounds should be plotted (if NULL, no confidence bounds will be plotted).

ggtheme

ggtheme to be used (default: theme_minimal()).

titleSurv

a title of a plot (default: "Survival curves").

xtitle

a title of x axis (default: "Time").

ytitleSurv

a title of y axis (default: "Probability of survivng up to time t")

legendtitle

a title of a legend (default: "Group").

Value

a ggplot containing n graphs, where n is number of risks. Each graph represents survival curves for given risk. One curve corresponds to one group.

See Also

ggplot ggtheme

Examples

1
2
fitS <- fitSurvival(time = LUAD$time, risk = LUAD$event, group = LUAD$gender, cens = "alive")
plotSurvival(fit = fitS, target = 1200)

geneticsMiNIng/cr17 documentation built on Sept. 16, 2019, 7:23 a.m.