plotratetable {cohorttools}R Documentation

Function makes plot(s) from ratetable

Description

Function makes plot(s) from ratetable

Usage

plotratetable(rt, RR = FALSE)

Arguments

rt

Rate table produced by function mkratetable

RR

Boolean, if TRUE rate ratios plotted

Value

ggplot object, or list if multiple variables in rate table

Examples

library(ggplot2)
library(survival)
tmp.lt1<-mkratetable(Surv(time,status)~ ph.ecog,data=lung,add.RR = FALSE)
plotratetable(tmp.lt1)
tmp.lt2<-mkratetable(Surv(time,status)~ sex+ph.ecog+cut(age,4),data=lung,add.RR=TRUE,lowest.N=1)
plotratetable(tmp.lt2,TRUE)

[Package cohorttools version 0.1.6 Index]