FastSurvplot: Fast way to draw a KM plot of ggplot style

Description Usage Arguments Author(s) See Also Examples

View source: R/base_FastSurvplot.R

Description

Fast way to draw a KM plot of ggplot style

Usage

1
2
3
4
5
6
FastSurvplot(data, time = "OS.time", status = "OS.status",
  marker = "pT", color = NULL, size = 16, legend = "top",
  legend.title = "T status", title = NULL, pval = TRUE,
  pval.position = c(1, 1), conf.int = F, risk.table = F,
  linetype = "solid", surv.median.line = "none", ncensor.plot = F,
  saveplot = F, name = "GC")

Arguments

data

a data frame

time

the colname of time

status

the colname of status

marker

the marker you want to explore with KM plot

color

If color=NULL,it would use the color from mycolor in lucky package.You can also set self-defined colors

size

the size of plot

legend

the position of legend

legend.title

the title of legend

title

the title of the KM plot

pval

whether to output P value in KM plot

pval.position

the position of P value in KM plot

conf.int

whether to output confidence interval

risk.table

whether to output risk table

linetype

line type

surv.median.line

whether to show median line

ncensor.plot

whether to show ncensor plot

saveplot

whether to save the KM plot

name

part name of saved plot

Author(s)

Weibin Huang<654751191@qq.com>

See Also

ggsurvplot.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
library(survival)
data("lung");
data = lung
data$status <- data$status -1
p <- FastSurvplot(data = data,
                  time = "time",
                  status = "status",
                  marker = "sex",
                  size = 10,
                  legend.title = "Sex",
                  pval.position = c(900,1))
p

shijianasdf/BasicBioinformaticsAnalysisFromZhongShan documentation built on Jan. 3, 2020, 10:08 p.m.