plot.surv.curve: Survival curve visualization with additional information.

Description Usage Arguments See Also Examples

View source: R/plot.surv.curve.R

Description

Survival curve visualization with additional information.

Usage

1
plot.surv.curve(gene, survdiff.formula, coxph.formula, data, ci.lab.xycoord=c(70,0.2), legend.xycoord=c(40,0.4), pngfig=NULL, main=gene, line.lwd=par("lwd"))

Arguments

gene

Variable of interest, e.g. a mutated gene.

survdiff.formula

An appropriate formula passed to survdiff, always put the variable-of-interest(VOI) as the last term.

coxph.formula

An appropriate formula for CoxPH regression analysis, alias put the VOI as the last term.

data

A data frame to be operated, column names must match those in the formula.

ci.lab.xycoord

The x and y coordinates for confidence interval.

legend.xycoord

The x and y coordinates for legend.

pngfig

A figure suffixed with .png, in which figure will be saved.

main

The main title for the figure.

line.lwd

Line width of survival curve.

See Also

survdiff,survfit,coxph

Examples

1
2
3
4
library(survival)
data("crcdat", package='lxctk')
survdiff.formula = as.formula("Surv(Survival.month, status) ~ hypermutated>0")
plot.surv.curve('hypermutated', survdiff.formula, survdiff.formula, data=crcdat, main="")

lixiangchun/lxctk documentation built on May 21, 2019, 6:44 a.m.