Title: | Create a Kaplan-Meier Plot with Numbers at Risk |
---|---|
Description: | To add the table of numbers at risk below the Kaplan-Meier plot. |
Authors: | Zhicheng Du, Yuantao Hao |
Maintainer: | Zhicheng Du<[email protected]> |
License: | GPL-3 |
Version: | 0.2.0 |
Built: | 2024-11-21 04:19:49 UTC |
Source: | https://github.com/cran/numKM |
To add the table of numbers at risk below the Kaplan-Meier plot.
numKM(sfit,timeby,timemax,xlab,ylab,col,g.names,lwd)
numKM(sfit,timeby,timemax,xlab,ylab,col,g.names,lwd)
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 |
plot |
a Kaplan-Meier plot with numbers at risk |
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.
Zhicheng Du<[email protected]>, Yuantao Hao<[email protected]>
require("survival") data(colon) fit <- survfit(Surv(time,status)~rx, data=colon) numKM(sfit=fit,timeby=500)
require("survival") data(colon) fit <- survfit(Surv(time,status)~rx, data=colon) numKM(sfit=fit,timeby=500)