tests/testthat/test-stepribbon.R

context("Step ribbon plots")

data("tongue", package="KMsurv")
library(survival)
cox.tongue <- coxph(Surv(time, delta)~type, data=tongue)
tdf <- broom::tidy(survfit(cox.tongue))

gg.obj <- ggplot(tdf, aes(x=time, y=estimate)) + 
	geom_stepribbon(aes(ymin=conf.low, ymax=conf.high))


test_that("Geom stepribbon works without error", {
	expect_is(gg.obj, c("gg", "ggplot"))
})
adibender/ldatools documentation built on March 7, 2020, 5:30 a.m.