numKM: Create a Kaplan-Meier Plot with Numbers at Risk

Description Usage Arguments Value Note Author(s) Examples

View source: R/numKM.R

Description

To add the table of numbers at risk below the Kaplan-Meier plot.

Usage

1
numKM(sfit,timeby,timemax,xlab,ylab,col,g.names,lwd)

Arguments

sfit

an object of survfit()

timeby

integer, the interval butween every ticks at the x axis

timemax

(optional) integer, the upper limit of the x axis

xlab

character, a title for the x axis

ylab

character, a title for the y axis

col

(optional) vector of integer or character, the colours for each group

g.names

vector of character, the names for each group

lwd

(optional) integer, the line width

Value

plot

a Kaplan-Meier plot with numbers at risk

Note

Please feel free to contact us, if you have any advice and find any bug!

Version 0.2.0: add the "timemax" and "lwd" arguments.

Author(s)

Zhicheng Du<dgdzc@hotmail.com>, Yuantao Hao<haoyt@mail.sysu.edu.cn>

Examples

1
2
3
4
require("survival")
data(colon)
fit <- survfit(Surv(time,status)~rx, data=colon)
numKM(sfit=fit,timeby=500)

numKM documentation built on April 14, 2020, 7:01 p.m.

Related to numKM in numKM...