numKM {numKM} | R Documentation |
Create a Kaplan-Meier Plot with Numbers at Risk
Description
To add the table of numbers at risk below the Kaplan-Meier plot.
Usage
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
require("survival")
data(colon)
fit <- survfit(Surv(time,status)~rx, data=colon)
numKM(sfit=fit,timeby=500)
[Package numKM version 0.2.0 Index]