library(ggplot2)
data(UTIdata)
ggplot(UTIdata) + geom_line(aes(x=Fup, y=log10(RNA), group=Patid)) +
geom_hline(yintercept=log10(50), color="red", linetype="dashed") +
geom_hline(yintercept=log10(400), color="red", linetype="dashed") +
labs(x="Time", y=bquote(log["10"]("RNA"))) + theme_bw()
# Proportion of censoring
prop.table(table(UTIdata$RNAcens))
Run the code above in your browser using DataLab