Type: | Package |
Title: | Create a Kaplan-Meier Plot with Numbers at Risk |
Version: | 0.2.0 |
Author: | Zhicheng Du, Yuantao Hao |
Maintainer: | Zhicheng Du<dgdzc@hotmail.com> |
Description: | To add the table of numbers at risk below the Kaplan-Meier plot. |
License: | GPL-3 |
Encoding: | UTF-8 |
Imports: | survival,graphics,stats |
LazyData: | true |
NeedsCompilation: | no |
Packaged: | 2020-03-29 14:29:32 UTC; dgdzc |
Repository: | CRAN |
Date/Publication: | 2020-03-29 15:00:09 UTC |
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)