Skip to content

typo in the qplot_survival function #1

@kippakers

Description

@kippakers

The last bit of code in the qplot_survival function reads:

ggplot(data=t.survframe, aes(colour=strata, group=strata)) + geom_step(aes(x=time, y=surv), direction="hv") + geom_ribbon(aes(x=time, ymax=upper, ymin=lower, fill=strata), directions="hv", linetype=0, alpha=0.25) + geom_point(data=subset(t.survframe, n.censor==1), aes(x=time, y=surv), shape=20) + geom_step(aes(x=time, y=upper), directions="hv", linetype=2, alpha=0.5) + geom_step(aes(x=time,y=lower), direction="hv", linetype=2, alpha=0.5)

But f.frame needs to replace t.survframe a few times. It should read:

ggplot(data=f.frame, aes(colour=strata, group=strata)) + geom_step(aes(x=time, y=surv), direction="hv") + geom_ribbon(aes(x=time, ymax=upper, ymin=lower, fill=strata), directions="hv", linetype=0, alpha=0.25) + geom_point(data=subset(f.frame, n.censor==1), aes(x=time, y=surv), shape=20) + geom_step(aes(x=time, y=upper), directions="hv", linetype=2, alpha=0.5) + geom_step(aes(x=time,y=lower), direction="hv", linetype=2, alpha=0.5)

Thanks for the code, by the way, it's great stuff!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions