plotratetable: Function makes plot(s) from ratetable

View source: R/cohorttools.R

plotratetableR 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)

cohorttools documentation built on Nov. 23, 2022, 5:06 p.m.