Package 'numKM'

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

Help Index


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<[email protected]>, Yuantao Hao<[email protected]>

Examples

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